aristaproto
Arista Protobuf / Python gRPC bindings generator & library
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 aristaprotouv
uv add aristaprotopoetry
poetry add aristaprotoInstalling 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
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
betterprotoGenerates idiomatic Python code from Protobuf 3…
permissive · top 5,000 on PyPI
betterproto-fwGenerates idiomatic Python code from Protobuf 3…
permissive · top 15,000 on PyPI
protoletariatProtoletariat rewrites Python imports generated…
permissive · top 5,000 on PyPI
grpclibgrpclib is a pure-Python asyncio-based…
permissive · top 1,000 on PyPI
protobuf_to_pydanticConverts Protobuf message definitions into…
permissive · top 15,000 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
betterproto2-compilerGenerates idiomatic Python code from Protobuf 3…
permissive · top 15,000 on PyPI
isolate-protoProvides gRPC protocol buffer definitions for…
unclear · top 15,000 on PyPI
hatch-protobufA Hatch build plugin that generates Python…
copyleft · top 15,000 on PyPI
betterproto2Generates idiomatic Python code from Protobuf…
permissive · top 5,000 on PyPI