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.

Source Distribution

chimera_client-0.0.2.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

chimera_client-0.0.2-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

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