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://nickolas360.com/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.
Release files for pyrcb2 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyrcb2-0.5.0.tar.gz | 174.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyrcb2-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 277.5 kB
Release files / pyrcb2-0.5.0.tar.gz
| Download URL | pyrcb2-0.5.0.tar.gz |
|---|---|
| Size | 174.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8afe2704938d9c69c27594ceeb0a070019077db0af728bc328ab72cac3b7eb5
|
|
BLAKE2b-256 checksum How to use checksums |
cb8c1659f054d545d04bf156b7f1c30e8fea516d5b32592f63c6b958799f15f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyrcb2-0.5.0-py3-none-any.whl
| Download URL | pyrcb2-0.5.0-py3-none-any.whl |
|---|---|
| Size | 102.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7b3ea5a4e9db2c0966a26b25068014f38ee3048b403362aed896e85fea78702
|
|
BLAKE2b-256 checksum How to use checksums |
fa225af0c79a6ff581187a9b731c68ebfa7e8b87103490052b1120b590c216b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |