skillfed

aristaproto

Arista Protobuf / Python gRPC bindings generator & library

aristaproto v0.1.5 199.7K downloads/30d#9,701 on PyPI1
Permissive license MIT Active released

What it is and what it does

Aristaproto is a Protocol Buffer compiler and runtime library for Python that generates gRPC service stubs and message classes from .proto definitions. It is a maintained fork of betterproto, dropping support for Python versions below 3.9 and adding nanosecond precision to Timestamp fields by subclassing datetime. The package supports both synchronous and asynchronous gRPC clients and servers via grpclib, with built-in JSON and dictionary serialization, one-of field handling, and introspection utilities.

You can use it in two ways: install the full package with the [compiler] feature to generate code from .proto files using protoc, or install just the library to use pre-generated code. Generated message classes inherit from aristaproto.Message and support serialization to bytes, JSON, and dicts. The async gRPC stubs are compatible with grpclib and provide type hints for better IDE support.

Use it for:

  • Generate Python gRPC client and server stubs from .proto definitions for microservice communication.
  • Serialize and deserialize Protocol Buffer messages to JSON or Python dicts in REST API bridges.
  • Build async gRPC services with type-checked stubs and automatic message validation.
  • Preserve nanosecond precision in timestamp fields when converting between Protobuf and Python datetime objects.
  • Implement one-of field logic with pattern matching on Python 3.10+ or explicit field introspection.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Generates Python gRPC stubs and message classes from Protocol Buffer definitions, with async support and nanosecond-precision timestamp handling.

Yes. Aristaproto is actively maintained, has low install friction, carries no known vulnerabilities, and is licensed permissively under MIT. It is suitable for projects needing Protocol Buffer code generation and async gRPC support in Python 3.9+. Install the [compiler] extra only if you need to generate code from .proto files; the base package alone suffices to use pre-generated message and service classes.

Install

aristaproto on PyPI

pip

pip install aristaproto

uv

uv add aristaproto

poetry

poetry add aristaproto

Installing aristaproto

Before you install

Low install friction with a pure-wheel distribution. Actively maintained with a recent release (66 days ago) and current Python version support (3.9–3.13). Three runtime dependencies are all stable, widely-used libraries.

License in practice

MIT license permits commercial and private use with minimal restrictions; suitable for most projects.

Quickstart

# Install library only (to use generated code)
pip install aristaproto

# Or install with compiler to generate from .proto files
pip install "aristaproto[compiler]"

# Use generated message class
import aristaproto

greeting = aristaproto.Message()
serialized = bytes(greeting)
deserialized = aristaproto.Message().parse(serialized)
print(deserialized.to_json())

Requires Python 3.9 or later. Generating code from .proto files requires protoc and grpcio-tools installed separately.

Verify before relying

  • Whether the nanosecond-precision Timestamp subclass is compatible with all datetime-expecting code paths in downstream libraries.
  • Performance characteristics compared to the original betterproto fork or official protobuf compiler output.
  • Scope and stability of cherry-picked changes from betterproto beyond the documented list.

Package facts

License MIT (permissive)
Python support supports the current Python release (<4.0,>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 3 — grpclib, python-dateutil, typing-extensions
Maintenance actively maintained — 66 days since the last release
Last repo commit
First released
Downloads 199,721/month — #9,701 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aristaproto-0.1.5-py3-none-any.whl

Keywords: protobuf, gRPC, aristanetworks, arista

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

protobuf code generationpython grpc stub generatorasync grpc bindingsprotobuf message serializationproto3 python compilergrpc service stubsprotobuf to python
protobufgrpccode-generation

More Software Development packages