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 //....
Release files for py-proto-parser 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| py_proto_parser-0.0.1.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| py_proto_parser-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.7 kB
Release files / py_proto_parser-0.0.1.tar.gz
| Download URL | py_proto_parser-0.0.1.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
33d05462db255013f93523770741d040a4b4d8ebddba7251cec18f7b5d1db79b
|
|
BLAKE2b-256 checksum How to use checksums |
097aca7412fc9c675eb8c44f66f8219a84799938a19c98710d1ddb95921ae543
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / py_proto_parser-0.0.1-py3-none-any.whl
| Download URL | py_proto_parser-0.0.1-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2862d6d509ed9740ec09d572f5476aa84c52408c79bacf7cfdf18bf5dbc6006
|
|
BLAKE2b-256 checksum How to use checksums |
da91835a9d3a792794b3907891abca2b9c0b00bae9ba227e70580dac57af0ebb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|