Skip to main content

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

See https://safir.lsst.io/dev/development.html.

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

safir-10.0.0.tar.gz (181.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

safir-10.0.0-py3-none-any.whl (153.1 kB view details)

Uploaded Python 3

File details

Details for the file safir-10.0.0.tar.gz.

File metadata

  • Download URL: safir-10.0.0.tar.gz
  • Upload date:
  • Size: 181.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.9

File hashes

Hashes for safir-10.0.0.tar.gz
Algorithm Hash digest
SHA256 11bdf7a129b445da9395008a4fe73bdf43da3c3546f7183d9974a969f2f132de
MD5 741735af0527b740b36113b8cd8a52fd
BLAKE2b-256 84b8c85eff31ef738a239409709460c3162f29a98df3fd00de49c1504f74bbe0

See more details on using hashes here.

Provenance

The following attestation bundles were made for safir-10.0.0.tar.gz:

Publisher: ci.yaml on lsst-sqre/safir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file safir-10.0.0-py3-none-any.whl.

File metadata

  • Download URL: safir-10.0.0-py3-none-any.whl
  • Upload date:
  • Size: 153.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.9

File hashes

Hashes for safir-10.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8bbff75a11b87c140214e6f5671852604867c56acf2aa30cd3a14347cbf4e7bc
MD5 8d465e223dea8f8c4acbc061fb39e2b7
BLAKE2b-256 4384a4c33f3a7e4abea1e15d5c94d3786558d730cbfa873d7d4ef27a0ab2c40a

See more details on using hashes here.

Provenance

The following attestation bundles were made for safir-10.0.0-py3-none-any.whl:

Publisher: ci.yaml on lsst-sqre/safir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page