A Python protobuf parser library.
Project description
py_proto
This is a Python-based protobuf parser. It is intended to serve as a reference implementation and is not production-ready.
Usage
Right now, the primary way to use this as a library in your Bazelified Python code.
Mount this repo in your Bazel workspace, then add @py_proto//src/util:parser
as a dependency:
py_library(
name = "your_python_code",
# ...
deps = [
"@py_proto//src/util:parser",
]
)
Then, in your Python code, use the parser:
from src.util.parser import ParseError, Parser
with open("your.proto", "r") as proto_file:
parsed_proto = Parser.loads(proto_file.read())
print(parsed_proto.syntax)
Development
We support building & running via Bazel. See the TODO.md
for what's on the roadmap.
Bazel
Do bazel test //...
.
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
py_proto_parser-0.0.1.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for py_proto_parser-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2862d6d509ed9740ec09d572f5476aa84c52408c79bacf7cfdf18bf5dbc6006 |
|
MD5 | 69dd3afde971fde27d7ebfc0ee8bf43c |
|
BLAKE2b-256 | da91835a9d3a792794b3907891abca2b9c0b00bae9ba227e70580dac57af0ebb |