Loading repository data…
Loading repository data…
taylordotfish / repository
A powerful asynchronous IRC bot library
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
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.
.. code:: python
await bot.join("#channel") print("There are", len(bot.users["#channel"]), "users in #channel.")
result = await bot.get_account("user1") if result.success: account = result.value or "(no account)" print("user1 is logged in as", account)
.. _asyncio: https://docs.python.org/3/library/asyncio.html
Install with pip::
$ pip3 install pyrcb2
Or clone and install with setup.py::
$ ./setup.py install
Alternatively, you can clone 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 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 <examples/>_.
__ https://taylor.fish/pyrcb2/ .. _this guide: https://taylor.fish/pyrcb2/getting-started.html
This branch contains the development version of pyrcb2.
See the stable branch for the latest stable release.
pyrcb2 requires Python 3.7 or later.
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.
.. _coverage: https://pypi.org/project/coverage
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 <LICENSE>_ and individual files for details.