Skip to main content

ProtoBuf definitions for HO components

Project description

HO protocols

ProtoBuf definitions used in various HO components.

Project is structured as recommended by Google for Python projects.

Python 3+ components

Installation

pip install ho-protocols

Use

import ho_protocols.example_pb2 as pb

req = pb.ExampleRequest()    
req.type = pb.ExampleRequest.Two
req.param = 42

print('Request:')
print(req)
print(req.SerializeToString())

res = pb.ExampleResponse()
res.valueA = 'Lorem'
res.valueB = 3.1415

print('\nResponse:')
print(res)
print(res.SerializeToString())

Build and distribute

Generate Python source files (including mypy stub files for better code completion)

protoc --python_out=./src --mypy_out=./src --proto_path=./src $(find ./src -name "*.proto")

Build distribution package

python3 -m build

Publish to PyPi

twine upload dist/*

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

ho-protocols-0.2.8.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

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

ho_protocols-0.2.8-py3-none-any.whl (38.7 kB view details)

Uploaded Python 3

File details

Details for the file ho-protocols-0.2.8.tar.gz.

File metadata

  • Download URL: ho-protocols-0.2.8.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for ho-protocols-0.2.8.tar.gz
Algorithm Hash digest
SHA256 218b4030efcf5e3fbce06ee5793a2c1b6277f787960e97ec55bcbfa6c3cdfb26
MD5 0761999448765286f0cf0dc3cf41ebb1
BLAKE2b-256 58fc28ec228a896963df9d204b7a68a2f1cc676b760e22c2c888c37cc08d1104

See more details on using hashes here.

File details

Details for the file ho_protocols-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: ho_protocols-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 38.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for ho_protocols-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 9e9344d4e74d6d9536aef05d99458de3b32e19fe806b58d905b528f415be3445
MD5 725f13d601054290bedd89528cf0a93e
BLAKE2b-256 323b438fbd6e56610b771589ea995660cbcf13d2fdba205d035e9f9c4dc47259

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