WIP extensions for miniirc.
Project description
miniirc_extras
An extension of miniirc (GitHub, GitLab) that adds more features.
Note that miniirc_extras is pre-alpha software and should not be used in production.
Some features here may be merged into miniirc eventually.
Loading features
After importing miniirc_extras, features can be loaded with
irc.require('feature_name')
, and once loaded can be accessed with
irc.feature_name
.
Features
ensure_connection
: https://github.com/luk3yx/miniirc/issues/15testfeature
: Debugging_json
(WIP): Parse JSON messages.
Creating new features
This API will probably change in the future.
You can create your own features with miniirc_extras.Feature
:
@miniirc_extras.Feature('feature_name')
class MyFeature:
def test_func(self, irc):
print('test_func called with', irc)
def __call__(self, irc):
print('MyFeature called with', irc)
def __init__(self, irc):
self._irc = irc
Once registered, you can require
and use it:
irc.require('feature_name')
irc.feature_name() # MyFeature called with <miniirc.IRC object>
irc.feature_name.test_func() # test_func called with <miniirc.IRC object>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
miniirc_extras-0.0.1.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for miniirc_extras-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7958f4d0463e5b2531af32a9fd4c3884414b084c4d8a0ee613c9b3e3fc00973 |
|
MD5 | 6e521e15ebd4fcd04341e4535d4e8035 |
|
BLAKE2b-256 | a795407108fefcaf8f03e28460f0bad3c4781fd5b875cd7f06d3e8fbfb0c5e44 |