A simple asyncio.Protocol implementation designed for IRC
Project description
async-irc
An implementation of asyncio.Protocol for IRC
Using the library
- You can install the library using pip:
pip install async-irc
Example
import asyncio
from asyncirc.protocol import IrcProtocol
from asyncirc.server import Server
loop = asyncio.get_event_loop()
servers = [
Server("irc.example.org", 6697, True),
Server("irc.example.com", 6667),
]
async def log(conn, message):
print(message)
async def main():
conn = IrcProtocol(servers, "BotNick", loop=loop)
conn.register_cap('userhost-in-names')
conn.register('*', log)
await conn.connect()
await asyncio.sleep(24 * 60 * 60)
try:
loop.run_until_complete(main())
finally:
loop.stop()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
async_irc-0.2.0.tar.gz
(14.0 kB
view details)
Built Distribution
File details
Details for the file async_irc-0.2.0.tar.gz
.
File metadata
- Download URL: async_irc-0.2.0.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58d630b36c50d437b23206d3df92d13dd453f99192880a28255c3a8f4d60dfde |
|
MD5 | c7736bed6f2aeebb18e03abe0e25540b |
|
BLAKE2b-256 | b48be1ffc629cf77d9e0f26a06e9302bf631008bdf83d2eaf0625e03aaf44214 |
File details
Details for the file async_irc-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: async_irc-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65cfdba915a2dbb471ed26bd34de965070fbe85ddca6a3bd72d8b14e4006068f |
|
MD5 | 188fea3d0548b1f5dfc838e9b932a420 |
|
BLAKE2b-256 | d7b9258ce7e96f63c424094c8cca0084ce95f72268707734475052a20310a144 |