Skip to main content

Internet Relay Chat (IRC) Protocol client library

Build Status Snippets Stats

Quick Start

import zirc, ssl

class Bot(zirc.Client):
    def __init__(self):
        self.connection = zirc.Socket(wrapper=ssl.wrap_socket)
        self.config = zirc.IRCConfig(host="irc.freenode.net",
            port=6697,
            nickname="zirctest",
            ident="bot",
            realname="test bot",
            channels=["##chat"],
            caps=zirc.Caps(zirc.Sasl(username="username", password="password")))

        self.connect(self.config)
        self.start()

    def on_privmsg(self, event, irc):
        irc.reply(event, "It works!")
        #Or alternatively:
        #irc.privmsg(event.target, "It works!")

Bot()

This library implements the IRC protocol, it’s an event-driven IRC Protocol framework.

Installation

PyPi

sudo pip install zirc
sudo pip3 install zirc

Github

sudo pip install git+https://github.com/itslukej/zirc.git
sudo pip3 install git+https://github.com/itslukej/zirc.git

Github will contain the latest bug fixes and improvements but sometimes also “bad quality” code.

Features

  • Automatic PING/PONG between the server

  • IRC Message parsing

  • A simple set up and connection method

  • Easy installation

  • Easy CTCP Set-up

IPv6

To use IPv6 with zirc.Socket, you can use the family socket.AF_INET6:

import socket

self.connection = zirc.Socket(family=socket.AF_INET6)

Proxy

Initialize zirc.Socket with argument socket_class:

self.connection = zirc.Socket(socket_class=zirc.Proxy(host="localhost", port=1080, protocol=zirc.SOCKS5))

Examples

You can find examples for zIRC by me and other users on CodeBottle

Ideas

  • Multiple connection support

TODO

  • More documentation

Contributing

Talk to us on #zirc at Freenode

Please discuss code changes that significantly affect client use of the library before merging to the master branch. Change the version in setup.py ahead if the change should be uploaded to PyPi.

Metadata

Release files for zirc 1.2.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zirc 1.2.10
File Size Uploaded Provenance
zirc-1.2.10.tar.gz 27.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for zirc 1.2.10
File Interpreter ABI Platform
zirc-1.2.10-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 45.1 kB

Release files / zirc-1.2.10.tar.gz

Download URL zirc-1.2.10.tar.gz
Size 27.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6f93d0d74c3c487f7d6261cf6abde079d7b4db275f896731caf92fd99b1bbf7d
BLAKE2b-256 checksum
How to use checksums
bb8d5141b74378d9bc9eb1215a9b8b41cd4b5762fca310ad38c665af8aa96fff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

Release files / zirc-1.2.10-py2.py3-none-any.whl

Download URL zirc-1.2.10-py2.py3-none-any.whl
Size 17.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b2c006a3db10457f588348059aca579ed6c4805d87890811bcc2f9d7a6e48eb2
BLAKE2b-256 checksum
How to use checksums
3620c105f2880e103198e8932827ae5a70d07fd17a00e2242678fbe257fdc0ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

Security for zirc 1.2.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page