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-9.1.1.tar.gz (177.4 kB view details)

Uploaded Source

Built Distribution

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

safir-9.1.1-py3-none-any.whl (148.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for safir-9.1.1.tar.gz
Algorithm Hash digest
SHA256 e1388b745f42030debd951a6f62e70b1fcdb217cb472c835ceffdcb90682f34a
MD5 b2f57769cf0ba4f06f0ad902d48f3ac8
BLAKE2b-256 46d6b485c2ff39d91f897cfeab8b16da63d06bf2f09d08c3ccf6536f7a4bc5c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for safir-9.1.1.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-9.1.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for safir-9.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea2fa7dbb75f4bf6101ae3e1a7a6beb0522c211fc1ad43321a8b00c09f6d8a2e
MD5 8d20da360e5c8b9a0462deee521232c2
BLAKE2b-256 cd5bf24f6a7eeead9d891fe1326157e6afc22814bfab9fca0e645f6f191ea17f

See more details on using hashes here.

Provenance

The following attestation bundles were made for safir-9.1.1-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