- Deprecated FastAPI
on_event
hooks have been replaced with a "lifespan" context manager for logging configuration. This requiresfastapi>=0.93
. - Updated okdata-sdk version requirement to remove the vulnerable ecdsa dependency.
-
okdata.aws.status.status_wrapper
now supports an optional argument for configuring the SDK instance used to call the status API.Current users must update their usage from:
@status_wrapper def foo(): ...
To:
@status_wrapper() def foo(): ...
- Status data exceptions are now accurately converted to strings when exported as JSON.
- Refactored status data helpers to adopt standard dataclasses in place of Pydantic, preventing Pydantic from being included as a transitive dependency for projects utilizing these helpers.
okdata.aws.status.sdk.Status
now accepts an additional optional parameter,sdk_config
, which allows the underlying Status SDK to be configured.
- New utility function
okdata.aws.ssm.get_secret
for retrieving secure strings from AWS SSM. - Updated dependencies.
- Added support for Python 3.10, 3.11, and 3.12.
- Dropped support for Python 3.7 which is being phased out by AWS. Python 3.8+ is now required.
- Fixed a bug in the logging module when the event from AWS contains
{"headers": null}
.
- Updated dependencies.
-
Replace the asynchronous logging wrapper with a method to register FastAPI logging middleware.
from okdata.aws.logging import add_fastapi_logging app = FastAPI() add_fastapi_logging(app)
- HTTP errors from the status API is no longer propagated to users of
@status_wrapper
; the errors are logged instead.
-
An asynchronous variant of the logging wrapper is now available:
@logging_wrapper("my-service", async_wrapper=True) async def handler(event, context): return await foo()
- The minimum required version of
okdata-sdk
has been raised to 0.8.1 to support Keycloak v12.
- Fix bug in validator
ensure_format_of_error
.
- The field
errors
has been added toStatusData
.
-
The
okdata
namespace package now uses the old-stylepkg_resources
declaration instead of being an implicit namespace package. -
The status wrapper no longer throws an exception when receiving an HTTP error response from the status API, but logs it instead.
- Added
status_wrapper
andstatus_add
from common-python underokdata.aws.status
.
- Initial release based on the old
common-python
project.