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.1.8.tar.gz
(8.0 kB
view hashes)
Built Distribution
Close
Hashes for async_irc-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcb3f95f68974f3f3467f3dffa616c597ffaee32e9f2242497a2010b258b6763 |
|
MD5 | f2b826e3feb907e8277f9317c176f905 |
|
BLAKE2b-256 | 5842d4ce744f904d8d6ac6c1a61d93e1518e53b7936a8a2c7f32a2f9b5441fd1 |