Skip to main content

Python library for unrealIRCD json-rpc

Project description

UNREALIRCD-RPC-PY

Static Badge Static Badge Dynamic JSON Badge Static Badge

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 (remotly)

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',
            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:
        print(f'-' * 16)
        print(f'Channel: {chan.name}')
        print(f'Created on: {chan.creation_time}')
        print(f'Bans: {chan.bans}')
        print(f'Members: {chan.members}')
        print(f'-' * 16)

How to work with (using unix socket locally)

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='unixsocket',
            path_to_socket_file='/path/to/unrealircd/socket/your_socket.socket'
        )

    # 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:
        print(f'-' * 16)
        print(f'Channel: {chan.name}')
        print(f'Created on: {chan.creation_time}')
        print(f'Bans: {chan.bans}')
        print(f'Members: {chan.members}')
        print(f'-' * 16)

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

unrealircd_rpc_py-0.0.7.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

unrealircd_rpc_py-0.0.7-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file unrealircd_rpc_py-0.0.7.tar.gz.

File metadata

  • Download URL: unrealircd_rpc_py-0.0.7.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for unrealircd_rpc_py-0.0.7.tar.gz
Algorithm Hash digest
SHA256 b3305f850058b790ecae05f91084ce759786196964688da80ec8c70726413c1e
MD5 d99af1a0dd422d33b8e7787686ecf45f
BLAKE2b-256 1dfba8b1e73b1daba38c42db65294f347e80d42363101d36775f11b16cc81d36

See more details on using hashes here.

File details

Details for the file unrealircd_rpc_py-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for unrealircd_rpc_py-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 45e934f10404c303643a10e63a473b4929958395f6fe66cb6441ba30ed01120b
MD5 1abbe357d3dcc0c0a457a358869c447f
BLAKE2b-256 3fc545ffd9e21ed7b13f70bf68091293419c0af9f5fba707d42fb1fcb85db162

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page