Archived
This project has been archived by its maintainers, and is no longer receiving any updates.
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.12.4 <= 3.20
- No Protobuf Compiler and generation needed
Install
You can install the library as a PIP package with prebuilt Protobuf messages:
pip install -U drift-protocol
if you want to build the messages on your machine you can install it from the git repository:
pip install git+https://github.com/panda-official/DriftProtocol.git#subdirectory=python
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
- Drift Python Client - Python Client to access data of PANDA|Drift
Metadata
Release files for drift-protocol 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| drift_protocol-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / drift_protocol-0.6.0-py3-none-any.whl
| Download URL | drift_protocol-0.6.0-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
020f6d5d0e3b3b70cdd5e2a8e90c682066f4ed70b4fa8aba97d467f2701e695c
|
|
BLAKE2b-256 checksum How to use checksums |
1b4e789abeff409e9e84c5934a6eb1a71f66da4d45e0a12f6a6727303a6145bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|