Coding Projects Python

asyncio: an interlude

Published · 3min

Yesterday’s entry contained some issues I didn’t notice until later. The main one is that after the initial successful test, I’d notice that the client would start to disconnect. There’s no explicit timeout on the connections, so this might be either some underlying socket timeout or …

Coding Projects Python

A simple asyncio client

Published · 2min

In the last entry, I implemented a ‘chat’-style protocol. Using loop.create_connection(), I can reuse ChatProtocol, but with a different client implementation to allow some interactivity. I’m assuming the server is in the same directory as this file so ChatProtocol can be imported from it.

import asyncio

from …
Coding Projects Python

Exploring asyncio protocols

Published · 4min

In the last entry, I managed to get a very basic daemon running. Now I need to flesh out the initial Protocol implementation to first turn it into a proper echo server and then implement a simple parser for a ‘chat’-style protocol.

The first bit is at least easy …

Coding Projects Python

Starting with asyncio

Published · 3min

I have an old project called uwhoisd from a previous life. It’s been about eight years since I last did anything significant with it. It’s now largely obsolete owing to the ICANN policy changes partially forced by the GDPR, but I’d like to use it as a …

Python Hacks Tools DevOps

Building Python fat RPMs with nfpm and some magic

Published · updated · 4min

I’d an awkward problem to solve recently: how do you build a relatively cross-platform fat RPM for a Python application without having to build out a bunch of extra build infrastructure.

On the face of it, this is easy, and this is something I’ve partially solved before. I …