Skip to main content

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.

Build status

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_proto_parser-0.0.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file py_proto_parser-0.0.1.tar.gz.

File metadata

  • Download URL: py_proto_parser-0.0.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for py_proto_parser-0.0.1.tar.gz
Algorithm Hash digest
SHA256 33d05462db255013f93523770741d040a4b4d8ebddba7251cec18f7b5d1db79b
MD5 7ddedee0409c95adf428f1aaf2906d1b
BLAKE2b-256 097aca7412fc9c675eb8c44f66f8219a84799938a19c98710d1ddb95921ae543

See more details on using hashes here.

File details

Details for the file py_proto_parser-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for py_proto_parser-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2862d6d509ed9740ec09d572f5476aa84c52408c79bacf7cfdf18bf5dbc6006
MD5 69dd3afde971fde27d7ebfc0ee8bf43c
BLAKE2b-256 da91835a9d3a792794b3907891abca2b9c0b00bae9ba227e70580dac57af0ebb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page