API reference¶
safir Package¶
Safir is the SQuaRE framework for Roundtable bots.
Variables¶
The version string of Safir (PEP 440 / SemVer compatible). |
|
The decomposed version, split across “ |
safir.dependencies.http_client Module¶
HTTP client dependency for FastAPI.
Classes¶
Provides an |
Variables¶
Default timeout (in seconds) for outbound HTTP requests. |
|
The dependency that will return the HTTP client. |
Class Inheritance Diagram¶
safir.dependencies.logger Module¶
Logger dependency for FastAPI.
Provides a structlog
logger as a FastAPI dependency. The logger
will incorporate information from the request in its bound context.
Classes¶
Provides a structlog logger configured with request information. |
Variables¶
The dependency that will return the logger for the current request. |
Class Inheritance Diagram¶
safir.logging Module¶
Utilities for configuring structlog-based logging.
Functions¶
|
Configure logging and structlog. |
Variables¶
Name of the configured global logger. |
safir.metadata Module¶
Standardized metadata for Roundtable HTTP services.
Functions¶
|
Retrieve metadata for the application. |
|
Get a specific URL from a package’s |
Classes¶
|
Metadata about a package. |
Class Inheritance Diagram¶
safir.middleware.x_forwarded Module¶
Update the request based on X-Forwarded-For
headers.
Classes¶
|
Middleware to update the request based on |