skillfed

yagrc

Yet another gRPC reflection client

yagrc v1.1.3 95.3K downloads/30d#13,274 on PyPI5
Permissive license Apache-2.0 Active released

What it is and what it does

Yagrc provides two main interfaces for working with gRPC services without running protoc. The reflector module lets you load protocol definitions from a gRPC server at runtime and retrieve service stubs and message classes by name; the importer module acts as a drop-in replacement for protoc-generated modules, allowing you to import them as if they were pre-generated, with the actual loading deferred until you connect to the server. Both rely on the server having gRPC reflection enabled.

The package is designed for situations where running protoc is inconvenient—such as when building a generic gRPC client, testing against services with evolving schemas, or working in environments where pre-generation isn't practical. It trades the safety and performance of compile-time code generation for runtime flexibility and reduced setup friction.

Use it for:

  • Build a generic gRPC client tool that works against any reflection-enabled service without pre-generating stubs
  • Test or debug gRPC services during development without regenerating code after proto changes
  • Dynamically call gRPC services from scripts or tools where protoc integration is impractical
  • Create a gRPC gateway or proxy that forwards calls to multiple backend services discovered via reflection

Worth the install?

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

Yagrc is a gRPC reflection client that lets you call gRPC services without pre-generating protocol buffers using protoc—it discovers service definitions and message types at runtime from a gRPC server's reflection API.

Yes, if your workflow involves calling gRPC services where pre-generating protobuf code is inconvenient or where you need runtime service discovery. The low install friction and active maintenance make it a practical choice. No, if you require the security guarantees and performance of compile-time code generation, or if you're working with security-sensitive applications—the documentation explicitly advises against reflection for those use cases.

Install

yagrc on PyPI

pip

pip install yagrc

uv

uv add yagrc

poetry

poetry add yagrc

Installing yagrc

Before you install

Low install friction: pure Python wheel with only three runtime dependencies (grpcio, grpcio_reflection, protobuf). Actively maintained with recent release on 2026-03-22.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.

Quickstart

pip install yagrc

from yagrc import reflector as yagrc_reflector

reflector = yagrc_reflector.GrpcReflectionClient()
reflector.load_protocols(channel, symbols=["Arithmetic.Subtraction"])
stub_class = reflector.service_stub_class("Arithmetic.Subtraction")
request_class = reflector.message_class("Arithmetic.Minuend")

The target gRPC server must have server reflection enabled; yagrc cannot discover services from servers without reflection support.

Verify before relying

  • Whether the lazy importer is thread-safe for concurrent imports across multiple threads
  • Performance characteristics when reflecting large or deeply nested proto schemas
  • Compatibility with services using custom authentication or TLS configurations

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 3 — grpcio, grpcio_reflection, protobuf
Maintenance actively maintained — 145 days since the last release
Last repo commit
First released
Downloads 95,278/month — #13,274 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: yagrc-1.1.3-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules

Tags

grpc reflection client pythondynamic grpc without protocgrpc service discovery runtimegrpc reflection api clientcall grpc services dynamicallygrpc protocol buffer reflectiongrpc introspection client
grpcreflectionprotobuf

More Python Modules packages