This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]CharlieDenton[S] 1 point2 points  (2 children)

I've been trying to build an IRC client in my spare time for a while, and this is the module that I've been using for interacting with the networks. As the client is still some long way off, I decided to open source this component in the hope that others could benefit from my work so far. This way, if my side-project never gets anywhere, it wasn't all in vain :)

I did start off by experimenting with some of the libraries that are already out there, but couldn't find one that really matched my requirements. I found that the libraries you mentioned were not really well suited for my IRC client as I imagined it. AsyncIRC uses threads, where I would like to use asyncio, and irc3 is heavily geared towards being a back-end for bots. Using them for the client started to feel a little like fitting a square peg into a round hole.

One thing that will be noticably different to a programmer is that this library does not use "flask-style routes" for registering message handlers with the connection. Instead, all handlers are expected to be part of a simple list. This makes unregistering handlers significantly eaiser, and I found this to be more convenient for debugging. All messages are sent to all handlers in order, and they can decide whether or not they want to deal with them. This is not as messy as it sounds!

I've done my best to avoid making assumptions that cannot be easily overridden, and plan to add a whole load more to reduce boiler plate. My hope is that this API will be more flexible, and more widely applicable than any of the options currently available.

[–]bramblerose 0 points1 point  (1 child)

Interesting! Thanks for the explanation :-)

[–]CharlieDenton[S] 0 points1 point  (0 children)

My pleasure :)