Protobuf Libraries to encode message in Drift infrastructure
Project description
Drift Protocol for Python
A Python Protobuf library to encode message in Drift infrastructure. It provides pre-generated Protobuf messages so that you don't need to install protobuf compiler and generate them yourself.
Features
- Protocol Buffer 3
- No Protobuf Compiler and generation needed
Install
You can install the library as a PIP package
pip install -U drift-protocol
Usage example
Parsing a Drift package:
from drift_protocol.common import DriftPackage, DataPayload, StatusCode
some_blob_received_from_drift = "...."
package: DriftPackage = DriftPackage()
package.ParseFromString(some_blob_received_from_drift)
if package.statuse != StatusCode.GOOD:
exit(-1)
for any_data in package.data:
if any_data.Is(DataPayload.DESCRIPTOR):
payload = DataPayload()
any_data.Unpack(payload)
data: bytes = payload.data
Related Projects
- WaveletBuffer - A universal C++ compression library based on wavelet transformation
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for drift_protocol-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b6fe0dc23bdec60a9ec228b2f744c5d6bdd15875ac33009420f2cdbba017b8a |
|
MD5 | fdd2cddb2d7368c23e2e395d5ebc264e |
|
BLAKE2b-256 | 1e92c283b5e7dffeb52817790f1a6efb44feb47b33b97281ed925083d191afcb |