Skip to main content

No project description provided

Project description

protoxy

A compiler for .proto files into FileDescriptorSets. Actually python bindings for the protox rust library.

Installation

pip install protoxy

Usage

import protoxy

# Compile a proto file (returns a FileDescriptorSets object using the protobuf library)
fds = protoxy.compile(["path/to/file.proto"])

# Compile a proto file (returns a binary FileDescriptorSets object)
fds_bin = protoxy.compile_bin(["path/to/file.proto"])

# Compile a proto file into a dynamic python module
mod = protoxy.compile_module(["path/to/file.proto"])

# The returned module is similar to the one generated by protoc
mod.file_pb2.Message()

Additional options

All those apis have additional options that can be passed as keyword arguments.

  • files: List of files to compile (can be strings or os.PathLike objects)

  • includes: List of include paths (can be strings or os.PathLike objects)

  • include_imports: Sets whether the output FileDescriptorSet should include imported files. only files explicitly included in files are included. If this option is set, imported files are included too.

  • include_source_info: Include source info in the output (this includes comments found in the source files)

  • use_protoc: Use the protoc binary to compile the files. If this is set to False, the Rust implementation

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

protoxy-0.7.0rc2.tar.gz (8.2 kB view hashes)

Uploaded Source

Built Distributions

protoxy-0.7.0rc2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (896.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

protoxy-0.7.0rc2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (886.1 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

protoxy-0.7.0rc2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl (963.8 kB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ i686

protoxy-0.7.0rc2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (897.5 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

protoxy-0.7.0rc2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (887.1 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

protoxy-0.7.0rc2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl (964.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ i686

protoxy-0.7.0rc2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (886.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

protoxy-0.7.0rc2-cp312-none-win_amd64.whl (696.3 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

protoxy-0.7.0rc2-cp312-none-win32.whl (650.4 kB view hashes)

Uploaded CPython 3.12 Windows x86

protoxy-0.7.0rc2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (895.6 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

protoxy-0.7.0rc2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (883.8 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

protoxy-0.7.0rc2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl (961.4 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.5+ i686

protoxy-0.7.0rc2-cp312-cp312-macosx_11_0_arm64.whl (717.0 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

protoxy-0.7.0rc2-cp312-cp312-macosx_10_12_x86_64.whl (820.9 kB view hashes)

Uploaded CPython 3.12 macOS 10.12+ x86-64

protoxy-0.7.0rc2-cp311-none-win_amd64.whl (697.1 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

protoxy-0.7.0rc2-cp311-none-win32.whl (650.7 kB view hashes)

Uploaded CPython 3.11 Windows x86

protoxy-0.7.0rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (895.8 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

protoxy-0.7.0rc2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (884.6 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

protoxy-0.7.0rc2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl (962.5 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.5+ i686

protoxy-0.7.0rc2-cp311-cp311-macosx_11_0_arm64.whl (802.3 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

protoxy-0.7.0rc2-cp311-cp311-macosx_10_12_x86_64.whl (821.5 kB view hashes)

Uploaded CPython 3.11 macOS 10.12+ x86-64

protoxy-0.7.0rc2-cp310-none-win_amd64.whl (697.1 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

protoxy-0.7.0rc2-cp310-none-win32.whl (650.6 kB view hashes)

Uploaded CPython 3.10 Windows x86

protoxy-0.7.0rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (896.0 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

protoxy-0.7.0rc2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (884.6 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

protoxy-0.7.0rc2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl (962.6 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.5+ i686

protoxy-0.7.0rc2-cp310-cp310-macosx_11_0_arm64.whl (802.2 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

protoxy-0.7.0rc2-cp39-none-win_amd64.whl (697.0 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

protoxy-0.7.0rc2-cp39-none-win32.whl (650.7 kB view hashes)

Uploaded CPython 3.9 Windows x86

protoxy-0.7.0rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (895.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

protoxy-0.7.0rc2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (884.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

protoxy-0.7.0rc2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (962.2 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ i686

protoxy-0.7.0rc2-cp39-cp39-macosx_11_0_arm64.whl (802.0 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

protoxy-0.7.0rc2-cp38-none-win_amd64.whl (697.0 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

protoxy-0.7.0rc2-cp38-none-win32.whl (650.5 kB view hashes)

Uploaded CPython 3.8 Windows x86

protoxy-0.7.0rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (895.4 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

protoxy-0.7.0rc2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (884.4 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

protoxy-0.7.0rc2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl (962.2 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.5+ i686

Supported by

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