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://pythonhosted.org/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.1.3.tar.gz (96.2 kB view details)

Uploaded Source

Built Distribution

pyrcb2-0.1.3-py3-none-any.whl (47.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrcb2-0.1.3.tar.gz
  • Upload date:
  • Size: 96.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyrcb2-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e5d1108f1c636bd1da8d98cfe07e12abadc2f60f1967dad13ad561b17d881dde
MD5 beeae8a4d6095df039db5f3ec25f4701
BLAKE2b-256 ed566f84bee6d1dc06814f92318c7d65f1cd935623c49754d7c06204fa5273f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyrcb2-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3c0de04b3a6cd761cf65666943df39217e0e2a685881c20716d48509ded3c6e7
MD5 63734e9772b88e888a410d0b92432737
BLAKE2b-256 9f23ff6f175a1e02a0c7f5f521cdeb8b943e6b8efb0ef6221e9d7f544425e1c3

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