jomiel-messages
The Python bindings for the jomiel protobuf messages.
About
The bindings have been generated from the protobuf declaration files of jomiel-proto
Installation
pip install jomiel-messages
Install from the repository, e.g. for development:
git clone https://github.com/guendto/jomiel-messages.git
cd jomiel-messages
./bin/gen
pip install -e .
Usage
Serialize an inquiry message:
from jomiel_messages.protobuf.v1alpha1.message_pb2 import Inquiry
inquiry = Inquiry()
inquiry.media.input_uri = 'https://foo.bar/baz'
serialized_string = Inquiry.SerializeToString(inquiry)
# ...
De-serialize a response message:
from jomiel_messages.protobuf.v1alpha1.message_pb2 import Response
from jomiel_messages.protobuf.v1alpha1.status_pb2 import STATUS_CODE_OK
response = Response()
response.ParseFromString(serialized_string)
if response.status.code != STATUS_CODE_OK:
print(f"message={response.status.message})
print(f"status-code={response.status.code}")
print(f"error-code={response.status.error}")
print(f"http-code={response.status.http.code}")
# ...
else:
# ...
License
jomiel-messages is licensed under the Apache License version
2.0.
Acknowledgements
Subprojects (as git subtrees)
Release files for jomiel-messages 0.2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jomiel_messages-0.2.1.1.tar.gz | 10.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jomiel_messages-0.2.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.5 kB
Release files / jomiel_messages-0.2.1.1.tar.gz
| Download URL | jomiel_messages-0.2.1.1.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
424ce66e85ebce2dad18d73f23d06bf0be08e19ad4a9ce715df16fc5ab2f5344
|
|
BLAKE2b-256 checksum How to use checksums |
2ab63c27e345fbf2512eaaa1aa3ac032460e08778a8dba7bb10ab80a0763a659
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|
Release files / jomiel_messages-0.2.1.1-py3-none-any.whl
| Download URL | jomiel_messages-0.2.1.1-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db4e6d86c8c8429ad68475bd2682fe30fd579915ff77ae321731b5cb470ebd23
|
|
BLAKE2b-256 checksum How to use checksums |
ab7ab79ace6335a749f24c34ca7b7f0a46c8aaba47029a5624eecee831334e6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|