skillfed

irc

IRC (Internet Relay Chat) protocol library for Python

irc v20.5.0 87.1K downloads/30d#13,815 on PyPI421
Permissive license Active released

What it is and what it does

The irc package is a full-featured IRC protocol library that abstracts the low-level IRC protocol details into an event-driven framework. It handles multiple simultaneous server connections, automatic server PONG responses, and provides both a traditional select()-based reactor and a Python 3 asyncio-based alternative. The library includes support for CTCP (Client-to-Client Protocol) and DCC (Direct Client Connection) file transfers, plus higher-level abstractions like a simple object-oriented client class and a bot framework.

You use it by instantiating a Reactor, registering event handlers, and calling methods on ServerConnection objects to send messages; incoming server messages trigger events that your handlers catch. The package includes example scripts demonstrating typical patterns. Ten runtime dependencies handle utilities like timezone support via pytz, text processing, and resource imports across Python versions.

Use it for:

  • Build an IRC bot that listens to channels and responds to commands or events
  • Create a simple IRC client that reads stdin and sends messages to a channel or user
  • Implement custom IRC server for testing or internal chat infrastructure
  • Handle DCC file transfers programmatically between IRC peers
  • Monitor IRC channels and log or react to specific message patterns

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a low-level, event-driven IRC protocol implementation with support for multiple simultaneous connections, CTCP, DCC, and both synchronous and asyncio-based event loops.

Yes, if you need to build IRC clients or bots in Python. The library is stable (Production/Stable status), permissively licensed, has low install friction, and carries no known vulnerabilities. The main gotcha is that documentation is acknowledged as sparse—you'll need to read examples and source code—and the asyncio version lacks DCC support. For straightforward IRC automation or bot work, it's a solid choice.

Install

irc on PyPI

pip

pip install irc

uv

uv add irc

poetry

poetry add irc

Installing irc

Before you install

Low friction install with a pure-Python wheel. Maintained actively with recent commits; repository shows ongoing development, suggesting stable rather than abandoned status.

License in practice

MIT-licensed under permissive terms, allowing use in commercial and proprietary projects with minimal restrictions.

Quickstart

pip install irc

import irc.client

reactor = irc.client.Reactor()
server = reactor.server()
server.connect('irc.example.com', 'botname')
reactor.process_forever()

Requires Python 3.8 or later. You must understand basic IRC protocol concepts (channels, nicks, commands) to use the library effectively.

Verify before relying

  • Whether the asyncio-based client (irc.client_aio) is production-ready given the note that DCC is not implemented in that version
  • Current state of documentation quality beyond the included examples and docstrings
  • Typical IRC server port numbers and connection parameters for usage examples

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 10 — jaraco.collections, jaraco.text, jaraco.logging, jaraco.functools, jaraco.stream, pytz, more-itertools, tempora, importlib-resources, importlib-metadata
Maintenance actively maintained — 761 days since the last release
Last repo commit
First released
Downloads 87,073/month — #13,815 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: irc-20.5.0-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: Only

Tags

IRC client library Pythoninternet relay chat protocolevent-driven IRC frameworkIRC bot frameworkasyncio IRC clientCTCP DCC supportIRC server connection
irc-protocolevent-drivenasyncio-support

More Internet packages