Skip to main content

A simple asyncio.Protocol implementation designed for IRC

Project description

async-irc

An implementation of asyncio.Protocol for IRC

CI - Test CD - Build codecov

PyPI - Version PyPI - Downloads PyPI - Python Version

linting - Ruff types - Mypy

License - MIT

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


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.3.0.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

async_irc-0.3.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file async_irc-0.3.0.tar.gz.

File metadata

  • Download URL: async_irc-0.3.0.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for async_irc-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7dac1e069659cd61000c460998c43c3af68407d8700fa1bf6a04b449d2f2743d
MD5 77fa8c470bc22dcc69c8bb825e364e20
BLAKE2b-256 8a447318235330f645380860028c932e678410dc17f50f62b91b5b36d410d7a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for async_irc-0.3.0.tar.gz:

Publisher: python-publish.yml on TotallyNotRobots/async-irc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file async_irc-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: async_irc-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for async_irc-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed161a76f70222dd992a30879d57fdcf773e3a9a151f6bf1981257bcb0f73341
MD5 54d2913585e60cb3fac864e0aaed7a84
BLAKE2b-256 f8dd7928b1f9132f7b97e6855ad4ded6f61d23118e2ccc0548e5e5f9a897988f

See more details on using hashes here.

Provenance

The following attestation bundles were made for async_irc-0.3.0-py3-none-any.whl:

Publisher: python-publish.yml on TotallyNotRobots/async-irc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page