Repository navigation
0.7.0
Added
- Ready-made probes, importable from
probirka:TcpProbe(no dependencies),PostgresAsyncpgProbe,RedisProbe,HttpHttpxProbe,HttpHttpx2Probe,HttpAiohttpProbe,KafkaAiokafkaProbe,RabbitmqAiopikaProbe,MongoPymongoProbe,MongoMotorProbe. Each accepts an existing client (or a zero-argument function returning one) or a connection string (#8) make_asgi_app— a generic ASGI 3 application serving the same JSON body and the same options as the framework adapters. It needs no third-party package at all, so unlike the othermake_*names it is always importable: register it as a route (Route('/health', app, methods=['GET', 'HEAD'])in Starlette), mount it (app.mount(...)in FastAPI,asgi('/health', is_mount=True)in Litestar), or serve it on its own port withuvicorn health:health_app(#10)MissingDependencyError(anImportError) raised on access to a probe or adapter whose client library is not installed; a library that is installed but too old keeps its original error (#8)ProbeFailure— exception for "the service answered, but not in a healthy way"; its message goes toProbeResult.error(#8)CallableProbeis exported from theprobirkapackage; names that need a third-party package are resolved lazily and listed in__all__only when their package is installed (#8)
Changed
- Minimum supported Python is 3.11; the test matrix covers 3.11 through 3.15 (#9)
started_atis timezone-aware in the local zone of the host, soto_dict()and every HTTP integration now emit an ISO 8601 timestamp with a UTC offset (#9)elapsedand the TTL cache are measured withtime.monotonic()instead of the wall clock, so clock adjustments no longer distort durations or cache expiry (#9)CallableProbefalls back to the class name for callables without__name__(functools.partial, objects with__call__) instead of raisingAttributeError(#9)groupsandwith_groupsaccept anySequence[str], not justlist(#9)- Type checking moved from mypy to ty; annotations use PEP 585/604 syntax throughout (#9)
- Framework adapter modules are private now (
probirka._ext.*);make_fastapi_endpoint,make_aiohttp_endpointandmake_django_vieware imported fromprobirkaas before, resolved lazily (#8) probirkastays dependency-free; client libraries and frameworks are installed separately (no extras) (#8)
Fixed
ProbeResult.elapsedno longer includes the time spent looking up the TTL cache (#9)
Full changelog: https://github.com/appKODE/probirka/blob/main/CHANGELOG.md