Skip to main content

Client for communication using chimera channels.

Project description

Installation

pip3 install chimera_client

Usage

Bellow are some examples of the basic usage.

Reader

    from chimera_client.reader import Reader

    # Read a message from specific channel
    reader = Reader(False)
    message = reader.readMessage('my_channel')

    # or

    # Read a message comming from any allowed channel
    reader = Reader()
    message = reader.readMessage()

    #### ... process the message read ... ####

    # Commit the changes.
    # It means that Reader processed the messages
    # and those will never be read again.
    reader.commit()

    # or changes in a specific channel
    reader.commit('my_channel')

    # close the Reader
    reader.close()

Writer

    from chimera_client.writer import Writer

    # message
    phone_info = {
        "name": "User1",
        "country": "Brazil",
        "ddi": 55,
        "ddd": 21,
        "phone": 999887766
    }

    # write the message in the phone_information_channel channel
    writer = Writer()
    writer.writeMessage(phone_info, 'phone_information_channe;')

Documentation

Install pydoc

    pip3 install pdoc3

View doc in terminal:

    pydoc3 chimera_client
    pydoc3 chimera_client.schema.py

View doc in the browser

    # start the pydoc3 server
    pydoc3 -b

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for chimera-client, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size chimera_client-0.0.2-py3-none-any.whl (5.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size chimera_client-0.0.2.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page