Skip to main content

Python bindings for jomiel protobuf messages

Project description

jomiel-messages

The Python bindings for the jomiel protobuf messages.

About

The purpose of this project is to provide the jomiel protobuf message bindings package that are easy to install from PyPI. The bundled have been generated from the protobuf declaration files of jomiel-proto.

License

jomiel-messages is licensed under the Apache License version 2.0.

Installation

pip install jomiel-messages

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:
  # ...

Building packages from repo

git clone https://github.com/guendto/jomiel-messages
cd jomiel-messages
./bin/gen
pip install pep517
git tag -s KEYID -am 'jomiel-messages version VERSION (INITIALS)' TAGNAME
python -m pep517.build [-s|-b] .

The packages are created under the dist/ dir.

Acknowledgements

Subprojects

jomiel-messages has the following subtrees (see git-subtree):

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.1.2.tar.gz (13.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.1.2-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jomiel_messages-0.1.2.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for jomiel_messages-0.1.2.tar.gz
Algorithm Hash digest
SHA256 90175d9bc2cbe531765eb3796c3e2f64053293419a57ef71e3a4e7364c9e6ac7
MD5 2cb30643e853abf4a4cfe494c6496125
BLAKE2b-256 312cdcd773a93b40d6713bd987553b02a8da031ab02675fb3d86923f0bdb74e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jomiel_messages-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for jomiel_messages-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3a11b4f0fcace9d6a908e4863cb76b33a3393b279e3b7a47ec7fb81571ec45c7
MD5 06ba0f89765d9316bd5ea0e03a1a2ca6
BLAKE2b-256 df53766eb81029578544521bddac230f7eb31fb50519319673f4bf9c3ad61a11

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