grpc-server-kit 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/CHANGELOG.md +7 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/PKG-INFO +2 -1
- grpc_server_kit-0.2.1/grpc_server_kit/__version__.py +1 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/interceptors/__init__.py +6 -2
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/interceptors/exception_handler.py +8 -4
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/pyproject.toml +1 -0
- grpc_server_kit-0.2.0/grpc_server_kit/__version__.py +0 -1
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/.gitignore +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/LICENSE +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/README.md +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/__init__.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/__init__.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/app.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/builder.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/dishka/__init__.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/dishka/bundle.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/dishka/interceptors.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/dishka/metrics.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/dishka/observability.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/dishka/server.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/health/__init__.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/health/cache.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/health/checkers/__init__.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/health/checkers/postgres.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/health/checkers/redis.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/health/checkers/utils.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/health/orchestrator.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/health/protocols.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/health/servicer.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/interceptors/base.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/interceptors/context.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/interceptors/metadata.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/interceptors/metrics.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/interceptors/protocols.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/interceptors/request_logger.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/interceptors/sentry.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/interceptors/tracing.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/observability/__init__.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/observability/tracing.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/runtime.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/server.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/config.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/constants.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/credentials.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/dishka/__init__.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/dishka/settings.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/interceptors/__init__.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/interceptors/constants.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/interceptors/utils.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/observability/__init__.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/observability/metrics.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/observability/naming.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/observability/protocols.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/observability/sentry.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/options.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/protocols.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/py.typed +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/server.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/settings.py +0 -0
- {grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/signals.py +0 -0
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.1](https://github.com/bedrock-python/grpc-server-kit/compare/grpc-server-kit-v0.2.0...grpc-server-kit-v0.2.1) (2026-10-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* map a failed outbound RPC instead of passing its status to the caller ([#50](https://github.com/bedrock-python/grpc-server-kit/issues/50)) ([232b190](https://github.com/bedrock-python/grpc-server-kit/commit/232b19076a083774dc52fbf01f1cc7809de04a98)), closes [#48](https://github.com/bedrock-python/grpc-server-kit/issues/48)
|
|
9
|
+
|
|
3
10
|
## [0.2.0](https://github.com/bedrock-python/grpc-server-kit/compare/grpc-server-kit-v0.1.1...grpc-server-kit-v0.2.0) (2026-09-14)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: grpc-server-kit
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Batteries-optional async gRPC server toolkit (app facade, builder, TLS, lifecycle, health, streaming-aware interceptors, observability)
|
|
5
5
|
Project-URL: Repository, https://github.com/bedrock-python/grpc-server-kit
|
|
6
6
|
Project-URL: Documentation, https://bedrock-python.github.io/grpc-server-kit/
|
|
@@ -217,6 +217,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
217
217
|
Classifier: Programming Language :: Python :: 3
|
|
218
218
|
Classifier: Programming Language :: Python :: 3.12
|
|
219
219
|
Classifier: Programming Language :: Python :: 3.13
|
|
220
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
220
221
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
221
222
|
Classifier: Typing :: Typed
|
|
222
223
|
Requires-Python: >=3.12
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.1"
|
{grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/interceptors/__init__.py
RENAMED
|
@@ -10,8 +10,12 @@ Canonical execution order (outermost first):
|
|
|
10
10
|
2. ``AsyncContextInterceptor`` (extract metadata into context vars)
|
|
11
11
|
3. ``AsyncRequestLoggerInterceptor`` (request/response logging)
|
|
12
12
|
4. ``AsyncTracingInterceptor`` (tracing span)
|
|
13
|
-
5. ``
|
|
14
|
-
6. ``
|
|
13
|
+
5. ``AsyncExceptionHandlerInterceptor`` (exception → gRPC status mapping)
|
|
14
|
+
6. ``AsyncSentryInterceptor`` (error tracking)
|
|
15
|
+
|
|
16
|
+
Sentry sits inside the exception handler so it sees the original exception;
|
|
17
|
+
outside, it would only see the ``grpc.aio.AbortError`` the handler turned it
|
|
18
|
+
into, and it never captures those.
|
|
15
19
|
"""
|
|
16
20
|
|
|
17
21
|
from .base import AsyncServerInterceptor, RpcCall, split_method_name
|
|
@@ -97,13 +97,19 @@ class AsyncExceptionHandlerInterceptor(AsyncServerInterceptor):
|
|
|
97
97
|
"""Interceptor that catches exceptions and converts them to gRPC errors.
|
|
98
98
|
|
|
99
99
|
Rules:
|
|
100
|
-
- ``grpc.aio.AbortError`` (the handler already aborted with its own status)
|
|
101
|
-
|
|
100
|
+
- ``grpc.aio.AbortError`` (the handler already aborted with its own status) is
|
|
101
|
+
re-raised as-is.
|
|
102
102
|
- ``CancelledError`` / ``KeyboardInterrupt`` / ``SystemExit`` are re-raised.
|
|
103
103
|
- Any other exception is mapped to a ``grpc.StatusCode`` (via the MRO) and the request
|
|
104
104
|
is aborted with details from the ``detail_factory``. Unmapped exceptions default to
|
|
105
105
|
``INTERNAL`` with a safe message (no internal details leaked).
|
|
106
106
|
|
|
107
|
+
A ``grpc.RpcError`` raised by an outbound call the handler made (``grpc.aio.AioRpcError``)
|
|
108
|
+
is one of those "other" exceptions: its status and details belong to the downstream
|
|
109
|
+
service, so it is mapped like anything else (``INTERNAL`` by default) instead of reaching
|
|
110
|
+
the caller as ``UNKNOWN`` with the downstream details. Map ``grpc.RpcError`` in
|
|
111
|
+
``error_status_map`` to report downstream failures with another status.
|
|
112
|
+
|
|
107
113
|
Covers streaming RPCs: exceptions raised while producing a response stream are
|
|
108
114
|
mapped and aborted the same way as unary failures.
|
|
109
115
|
"""
|
|
@@ -142,8 +148,6 @@ class AsyncExceptionHandlerInterceptor(AsyncServerInterceptor):
|
|
|
142
148
|
# The handler (or an inner interceptor) already aborted this RPC with
|
|
143
149
|
# its own status — pass it through untouched.
|
|
144
150
|
raise
|
|
145
|
-
except grpc.RpcError:
|
|
146
|
-
raise
|
|
147
151
|
except Exception as exc:
|
|
148
152
|
await self._abort_with_mapped_status(exc, call)
|
|
149
153
|
|
|
@@ -15,6 +15,7 @@ classifiers = [
|
|
|
15
15
|
"Programming Language :: Python :: 3",
|
|
16
16
|
"Programming Language :: Python :: 3.12",
|
|
17
17
|
"Programming Language :: Python :: 3.13",
|
|
18
|
+
"Programming Language :: Python :: 3.14",
|
|
18
19
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
19
20
|
"Typing :: Typed",
|
|
20
21
|
]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/health/checkers/__init__.py
RENAMED
|
File without changes
|
{grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/health/checkers/postgres.py
RENAMED
|
File without changes
|
{grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/health/checkers/redis.py
RENAMED
|
File without changes
|
{grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/health/checkers/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/interceptors/metadata.py
RENAMED
|
File without changes
|
|
File without changes
|
{grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/interceptors/protocols.py
RENAMED
|
File without changes
|
{grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/interceptors/request_logger.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/observability/__init__.py
RENAMED
|
File without changes
|
{grpc_server_kit-0.2.0 → grpc_server_kit-0.2.1}/grpc_server_kit/aio/observability/tracing.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|