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
Release history Release notifications | RSS feed
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.0.2.dev4.tar.gz
(19.4 kB
view hashes)
Built Distribution
Close
Hashes for ho_protocols-0.0.2.dev4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ab5fbb5e2f552e66a4558b5998a4c1bab4c804ee3fd720639dd1748b955f56a |
|
MD5 | e17b8f3d13180d9850855777431bd146 |
|
BLAKE2b-256 | fc930dd1a7888dc61a2d51f4545d2126ee63b6c1e1829b6cda4df20b127c0ca9 |