--- id: aristaproto version: "0.1.5" license: MIT license_treatment: permissive maintenance: active --- # aristaproto — Arista Protobuf / Python gRPC bindings generator & library License: permissive · Maintenance: active · Downloads: 199.7K/mo ## 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 above — 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 pip install aristaproto uv add aristaproto 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_current - Install friction: low - Maintenance: active - Downloads: 199.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags protobuf code generation, python grpc stub generator, async grpc bindings, protobuf message serialization, proto3 python compiler, grpc service stubs, protobuf to python, protobuf, grpc, code-generation [View on SkillFed](https://skillfed.io/packages/aristaproto) · [View on PyPI](https://pypi.org/project/aristaproto/)