Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.1.1 instead.

grpcreflect-py

An idiomatic Python implementation of the gRPC Server Reflection protocol (grpc.reflection.v1 and grpc.reflection.v1alpha), built on protobuf-py and connectrpc. Modeled on Buf's Go reference implementation, grpcreflect-go.

Since the reflection services here are just ConnectASGIApplications like any other, they work over whichever of connectrpc's protocols your own services already speak -- Connect, gRPC, and gRPC-Web -- with no extra configuration.

Install

uv add grpcreflect-py

Usage

mount_reflection_handlers() takes the same ConnectASGIApplication instances you're already mounting for your own services, derives a registry from their descriptors, and returns them alongside ready-to-mount v1 and v1alpha reflection applications:

from starlette.applications import Starlette
from starlette.routing import Mount
from grpcreflect.server import mount_reflection_handlers

from example.greet import GreetServiceImpl
from example.gen.greet.v1.greet_connect import GreetServiceASGIApplication

app = Starlette(
    routes=[
        Mount(a.path, app=a)
        for a in mount_reflection_handlers(
            GreetServiceASGIApplication(GreetServiceImpl())
        )
    ]
)

ServerReflectionInfo is a bidirectional streaming RPC, which requires an HTTP/2-capable ASGI server. As of this writing, pyvoy is the server most reliably passing the Connect conformance suite's HTTP/2 and bidi-streaming tests, so it's the recommended way to serve app above:

import asyncio
import pyvoy

async def main() -> None:
    server = pyvoy.PyvoyServer("myapp:app", port=8080)
    await server.start()
    await server.wait()

asyncio.run(main())

You aren't required to use pyvoy -- any ASGI server with working HTTP/2 and bidi-streaming support will do -- but not every ASGI server reliably supports both today.

Client

Client speaks gRPC Server Reflection against a server, preferring v1 and falling back to v1alpha automatically the first time it discovers v1 isn't implemented. new_stream() opens a ClientStream, which pins a sequence of calls to one open stream so they're all answered by a single, consistent view of the server's schema:

import asyncio

from grpcreflect.client import Client


async def main() -> None:
    async with Client("http://localhost:8080") as client, client.new_stream() as stream:
        print(await stream.list_services())

        for descriptor in await stream.file_containing_symbol("greet.v1.GreetService"):
            print(descriptor.name)


asyncio.run(main())

Development

uv run -- buf generate   # regenerate src/grpcreflect/_gen from the upstream schema
uv run pytest

Metadata

Release files for grpcreflect-py 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for grpcreflect-py 0.1.0
File Size Uploaded Provenance Actions
grpcreflect_py-0.1.0.tar.gz 18.8 kB With provenance Details for grpcreflect_py-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for grpcreflect-py 0.1.0
File Interpreter ABI Platform Actions
grpcreflect_py-0.1.0-py3-none-any.whl Python 3 none any Details for grpcreflect_py-0.1.0-py3-none-any.whl

Total release size: 45.4 kB

Release files / grpcreflect_py-0.1.0.tar.gz

Download URL grpcreflect_py-0.1.0.tar.gz
Size 18.8 kB
Tags Source
SHA-256 checksum
How to use checksums
aa274ae3a3cbfed78c3d642c59dcb3c80e8396f0525437c8b5d8c161f6453d39
BLAKE2b-256 checksum
How to use checksums
efc3930d1ea1a4657a081c7ed0dbf683254c24c592f3305fcdbccdb8dc65300d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / grpcreflect_py-0.1.0-py3-none-any.whl

Download URL grpcreflect_py-0.1.0-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58523ed6d6de7ea0dafe4c7c52a5d9fb305b56208676b1f704ba48c0c6266903
BLAKE2b-256 checksum
How to use checksums
54ea1ff03beef99e9923e7badd763b88d04a4608f5d8abe1a516bddacb8e4186
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for grpcreflect-py 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for grpcreflect_py-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page