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)
Built Distribution
Close
Hashes for chimera_client-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95b3171fee1a7bd4092b7468d3c3192756b83c3f6aa1a53c91171c3e9111f2f6 |
|
MD5 | 494a02aedb07bdb2a50813cf0a692159 |
|
BLAKE2b-256 | b92058fa97990b39a4c9d25352ca78aabec5b4728c923587cc48ea33cda7f038 |