The Rubin Observatory SQuaRE framework for FastAPI services.
Project description
Safir
Safir is Rubin Observatory's library for building FastAPI services for the Rubin Science Platform (Phalanx) and Roundtable Kubernetes clusters. Safir is developed, maintained, and field tested by the SQuaRE team.
Safir is available from PyPI:
pip install safir
The best way to create a new FastAPI/Safir service is with the fastapi_safir_app
template.
Read more about Safir at https://safir.lsst.io.
Features
- Set up an
httpx.AsyncClient
as part of the application start-up and shutdown lifecycle. - Set up structlog-based logging.
- Middleware for attaching request context to the logger to include a request UUID, method, and route in all log messages.
- Process
X-Forwarded-*
headers to determine the source IP and related information of the request. - Gather and structure standard metadata about your application.
- Operate a distributed Redis job queue with arq using convenient clients, testing mocks, and a FastAPI dependency.
Developing Safir
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file safir-7.0.0.tar.gz
.
File metadata
- Download URL: safir-7.0.0.tar.gz
- Upload date:
- Size: 168.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a43143ec1a8b569a27b0731c96393b91df1f0a8a7e811efe9e59f303087dc679 |
|
MD5 | 8a0be2b84afd50b8a6a8d5bd79b4498b |
|
BLAKE2b-256 | 5fb5b48b724f947a5c120b1f86ec87e79e0bb4256286d81e8e2c517d82ffeb89 |
Provenance
The following attestation bundles were made for safir-7.0.0.tar.gz
:
Publisher:
ci.yaml
on lsst-sqre/safir
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
safir-7.0.0.tar.gz
- Subject digest:
a43143ec1a8b569a27b0731c96393b91df1f0a8a7e811efe9e59f303087dc679
- Sigstore transparency entry: 147682714
- Sigstore integration time:
- Predicate type:
File details
Details for the file safir-7.0.0-py3-none-any.whl
.
File metadata
- Download URL: safir-7.0.0-py3-none-any.whl
- Upload date:
- Size: 140.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b781c5d3a7db07d91be2dffcf5842406b0b40d75a130c167b1527147c754dddc |
|
MD5 | 1bc0dc877c287b646a7cc926c71696af |
|
BLAKE2b-256 | a6efb1d19449971f4af8cabd65ffc0cbf8e4da26774b47c93bba350764e62e2b |
Provenance
The following attestation bundles were made for safir-7.0.0-py3-none-any.whl
:
Publisher:
ci.yaml
on lsst-sqre/safir
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
safir-7.0.0-py3-none-any.whl
- Subject digest:
b781c5d3a7db07d91be2dffcf5842406b0b40d75a130c167b1527147c754dddc
- Sigstore transparency entry: 147682717
- Sigstore integration time:
- Predicate type: