grpc-interceptor
Simplifies gRPC interceptors
Decision gist · record as of 2026-08-14
Yes, if you are building or maintaining gRPC services in Python and want cleaner interceptor code. The package is stable, has no known vulnerabilities, and low install friction. Maintenance is dormant but the code is mature and unlikely to need frequent updates. The main caveat is that asyncio client interceptors are not supported; if you rely on async clients, you'll need to work around this limitation or use the standard gRPC API.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction install with a single runtime dependency (grpcio).
- Maintenance is dormant—last release was 2023-11-16 and no commits since 2024-04-11—but the package is stable and the repository remains active and unarchived.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions, provided you include the license notice.
last release 2023-11-16 (1002 days) · last repo commit 2024-04-11 · 151 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 26,131,695 downloads/mo, #889 on PyPI
Alternatives
Verify before relying
pip install grpc-interceptor
from grpc_interceptor import ServerInterceptor
from grpc_interceptor.exceptions import GrpcException
class MyInterceptor(ServerInterceptor):
def intercept(self, method, request_or_iterator, context, method_name):
try:
return method(request_or_iterator, context)
except GrpcException as e:
context.set_code(e.status_code)
context.set_details(e.details)
raise
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10),
interceptors=[MyInterceptor()])- Whether asyncio client interceptors are planned or if the lack of them is a permanent limitation
- Level of active maintenance and likelihood of accepting bug fixes or security updates
What it is and what it does
grpc-interceptor wraps the standard gRPC Python interceptor API to make it simpler to write custom request/response handlers for gRPC services. The standard gRPC interceptor interface is flexible but cumbersome—it doesn't give you direct access to request and response objects or the service context. This package provides ServerInterceptor and ClientInterceptor base classes that expose these objects directly, so you can log requests, modify responses, set error codes, or inject metadata without boilerplate.
You write a subclass, override the intercept method, and call the next handler in the chain. For servers, you can raise GrpcException subclasses (like NotFound) from anywhere in your code and have them automatically converted to gRPC status codes. For clients, you can inject metadata, retry failed calls, or transform responses. The package supports unary and streaming RPCs; asyncio client interceptors are not yet available.
Use it for
- Log all incoming RPC requests and responses with full access to message contents and metadata
- Convert application exceptions into proper gRPC status codes without manually calling context.set_code in every handler
- Inject authentication tokens or request IDs into client calls via metadata without modifying stub code
- Implement client-side retry logic for specific gRPC errors across all RPC methods
- Add request validation or response transformation at the interceptor level for all services
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building or maintaining gRPC services in Python and want cleaner interceptor code.
The package is stable, has no known vulnerabilities, and low install friction. Maintenance is dormant but the code is mature and unlikely to need frequent updates. The main caveat is that asyncio client interceptors are not supported; if you rely on async clients, you'll need to work around this limitation or use the standard gRPC API.
Install
grpc-interceptor on PyPI
Before you install
Low friction install with a single runtime dependency (grpcio). Maintenance is dormant—last release was 2023-11-16 and no commits since 2024-04-11—but the package is stable and the repository remains active and unarchived.
License in practice
MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions, provided you include the license notice.
Quickstart
pip install grpc-interceptor
from grpc_interceptor import ServerInterceptor
from grpc_interceptor.exceptions import GrpcException
class MyInterceptor(ServerInterceptor):
def intercept(self, method, request_or_iterator, context, method_name):
try:
return method(request_or_iterator, context)
except GrpcException as e:
context.set_code(e.status_code)
context.set_details(e.details)
raise
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10),
interceptors=[MyInterceptor()])
Verify before relying
- Whether asyncio client interceptors are planned or if the lack of them is a permanent limitation
- Level of active maintenance and likelihood of accepting bug fixes or security updates
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7,<4.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagegrpcio |
| Maintenance | Dormant 1,002 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 26,131,695 / month, #889 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8 |
Evidence: grpc_interceptor-0.15.4-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “grpc interceptor”
- grpc-interceptorProvides simplified server and client interceptors for gRPC services,…
- py-grpc-prometheusAdds Prometheus metrics collection to gRPC services via interceptors,…
- connect-pythonProvides Python client and server libraries for Connect RPC, a…
Give your agent the search over MCP, or paste the wish link into any chat.
Similar packages
Adds Prometheus metrics collection to gRPC services via interceptors, tracking request counts, message volumes, and handling latencies on both client and server sides.
However, verify the unclear license before use in proprietary contexts, and be aware that dormant maintenance means no active support for future gRPC or Prometheus…
Adds automatic tracing and monitoring to gRPC Python client and server calls through OpenTelemetry interceptors, capturing request/response metadata and performance metrics.
grpclib is a pure-Python asyncio-based implementation of gRPC that lets you build asynchronous client and server applications using protocol buffers for serialization.
gRPC Python is an HTTP/2-based RPC framework that enables you to define and call remote procedures across network boundaries using protocol buffers for serialization.
Install it if you need RPC communication in a distributed system or are integrating with existing gRPC services.
Exposes debugging and monitoring services for gRPC applications, including channel tracing metrics and client status discovery.
Client library for Nebius AI Cloud services that provides gRPC-based authentication, resource management, and API communication with async/sync support.
However, version 0.5.x introduces breaking changes from 0.4.x and requires careful attention to event loop ownership, thread safety, and async/sync boundary crossing.
See also connectrpc · yagrc · grpcio-csds · connect-python