Skip to main content

Python bindings for jomiel protobuf messages

Reason this release was yanked:

Missing the generated bindings.

Project description

jomiel-messages

pypi-pyversions pypi-v pypi-wheel pypi-status code-style

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)

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

jomiel_messages-0.2.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jomiel_messages-0.2.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file jomiel_messages-0.2.1.tar.gz.

File metadata

  • Download URL: jomiel_messages-0.2.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for jomiel_messages-0.2.1.tar.gz
Algorithm Hash digest
SHA256 aa935b5b7bb2260f554689715de7a58e37184b737fab3523835a06f7a1638b6a
MD5 ee5c89915eee38418678f3d46d35d68d
BLAKE2b-256 6ecaa331ad0cb724b259201beaf66043a02cd1cfda070e634e54a3f6b167b9a4

See more details on using hashes here.

File details

Details for the file jomiel_messages-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jomiel_messages-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bceeae3c582cff886e976dc260e1827a05d89753d2d65bec509695f77b6143e4
MD5 d332009b33571d109c66696000ae4358
BLAKE2b-256 287a26ac05578a2e447c328a90c149d97abaf301721a5daed44deea96f277e2f

See more details on using hashes here.

Supported by

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