Skip to main content

An asyncio-based IRC bot library.

Project description

pyrcb2 is an asyncio-based library for writing IRC bots. It is designed to be easy to use, customizable, and high-level.

pyrcb2 includes features such as account tracking, user prefix tracking (voice, op, etc.), messaging delaying to prevent throttling, and long message splitting.

pyrcb2 also makes use of asyncio and coroutines in Python. This allows you to write asynchronous code in a linear fashion—you can handle responses to commands right after you send them.

# Wait until the bot has joined #channel.
await bot.join("#channel")
print("There are", len(bot.users["#channel"]), "users in #channel.")

# Get user1's account.
result = await bot.get_account("user1")
if result.success:
    account = result.value or "(no account)"
    print("user1 is logged in as", account)

Installation

Install with pip:

$ pip3 install pyrcb2

Or download the source code and install with setup.py:

$ ./setup.py install

Alternatively, you can download the source code and install with pip:

$ pip3 install .

You will need to run the commands above as root if you’re installing globally. You can use the --user option to install to your home directory instead.

Documentation

Documentation for pyrcb2 is available at https://taylor.fish/pyrcb2/. If you’re new to pyrcb2, start with this guide and take a look at the examples.

Tests

To run pyrcb2’s tests, run python3 -m tests. If you have coverage installed, you can run coverage run -m tests.__main__ to get information on test coverage.

License

pyrcb2 is licensed under the GNU Lesser General Public License, version 3 or later. Some parts are released under other licenses; see the full license notice and individual files for details.

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

pyrcb2-0.6.0.tar.gz (174.5 kB view details)

Uploaded Source

Built Distribution

pyrcb2-0.6.0-py3-none-any.whl (98.6 kB view details)

Uploaded Python 3

File details

Details for the file pyrcb2-0.6.0.tar.gz.

File metadata

  • Download URL: pyrcb2-0.6.0.tar.gz
  • Upload date:
  • Size: 174.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.8.0 tqdm/4.56.0 CPython/3.9.1rc1

File hashes

Hashes for pyrcb2-0.6.0.tar.gz
Algorithm Hash digest
SHA256 24d2cc1e7a8f1f1a4dd8000b9d40b1bf4e123407baaa1ee8743b76cc7366de35
MD5 18a13f8d81045878cd804a66c8f23b30
BLAKE2b-256 00f2513d06cbc34d3bab0cb7992efa1a5caaccaece420236d0fcb045cfd2a11e

See more details on using hashes here.

File details

Details for the file pyrcb2-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: pyrcb2-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 98.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.8.0 tqdm/4.56.0 CPython/3.9.1rc1

File hashes

Hashes for pyrcb2-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97b5788f2fae5d2ebf437240c7343fa80d604c7d49a99db315b40223c4661711
MD5 4824a4c365f4e0d9542f9a67f1ad2aaf
BLAKE2b-256 ddc499f0825c0976b125411efa8e6793713c604b52d1b2fa2c0f31bfcf9f6edc

See more details on using hashes here.

Supported by

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