Python library for unrealIRCD json-rpc
Project description
UNREALIRCD-RPC-PY
If you are using Python3, this package can help you to parse all json responses it does all the work for you.
How to use this package
$ pip3 install unrealircd_rpc_py
How to work with
This package allows easy interfacing with UnrealIRCd through regular Python3 code, such as:
from unrealircd_rpc_py.Loader import Loader
# Initialize your connexion to unrealircd
rpc = Loader(
req_method='requests', # you can also use 'socket'
url='https://your.irc.domaine.org:8600/api',
endpoint='api',
host='your.irc.domaine.org',
port=8600,
username='apiname',
password='apiPASSWORD'
)
# Enjoy the power of JSON-RPC
User = rpc.User
response = User.get('adator')
print(f'Nickname: {response.name}')
print(f'Ip: {response.ip}')
Channels = rpc.Channel
response = Channels.list_(_object_detail_level=3)
for chan in Channels.DB_CHANNELS:
if chan.name == '#welcome':
print(f'Channel: {chan.name}')
print(f'Created on: {chan.creation_time}')
print(f'Bans: {chan.bans}')
print(f'Members: {chan.members}')
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
unrealircd_rpc_py-0.0.4.tar.gz
(17.4 kB
view details)
Built Distribution
File details
Details for the file unrealircd_rpc_py-0.0.4.tar.gz
.
File metadata
- Download URL: unrealircd_rpc_py-0.0.4.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2836899a57b2b2fc77cbafdd1e6740a0c5a04595e22034dc0940f129654cc043 |
|
MD5 | c9a8e8ce65b4bb779324878f3d8e9494 |
|
BLAKE2b-256 | 6feb3dc166a00510cdf1bafd1879ce3e5aea18683ecf477dfb0feedd0a68b5d1 |
File details
Details for the file unrealircd_rpc_py-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: unrealircd_rpc_py-0.0.4-py3-none-any.whl
- Upload date:
- Size: 25.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5ceabf5cb17304b6e7dcf9bd86db1378a914fd78af4a84f4dd1110905f1d317 |
|
MD5 | 23845403f360fc42af12abc144fac61b |
|
BLAKE2b-256 | 91cd9a69aa4d07df199c20477823dbf97893d22eafb35d18d678bbc23039649b |