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 hashes)
Built Distribution
Close
Hashes for async_irc-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65cfdba915a2dbb471ed26bd34de965070fbe85ddca6a3bd72d8b14e4006068f |
|
MD5 | 188fea3d0548b1f5dfc838e9b932a420 |
|
BLAKE2b-256 | d7b9258ce7e96f63c424094c8cca0084ce95f72268707734475052a20310a144 |