Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

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.

Files for jomiel-messages, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size jomiel_messages-0.1.2-py3-none-any.whl (13.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size jomiel_messages-0.1.2.tar.gz (13.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page