Expand description

Rust/Python bindings, runtime and utilities.

This crates implements all the generic code needed to start and manage a Smithy Rust HTTP server where the business logic is implemented in Python, leveraging PyO3.

Modules

Python wrapped types from aws-smithy-types.

Structs

Python application definition, holding the handlers map, the optional Python context object and the asyncio task locals with the running event loop.

The Python business logic implementation needs to carry some information to be executed properly like the size of its arguments and if it is a coroutine.

Python compatible wrapper for the aws_smithy_http_server::Router type.

PyState structure holding the Python context.

Socket implementation that can be shared between multiple Python processes.

Enums

Python error that implements foreign errors.

This custom logger enum exported to Python can be used to configure the both the Rust tracing and Python logging levels. We cannot export directly tracing::Level to Python.

Functions

Setup tracing::subscriber reading the log level from RUST_LOG environment variable and inject the custom Python logger into the interpreter.

Type Definitions

Mapping holding the Python business logic handlers.