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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safir-6.5.0.tar.gz (168.8 kB view details)

Uploaded Source

Built Distribution

safir-6.5.0-py3-none-any.whl (141.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for safir-6.5.0.tar.gz
Algorithm Hash digest
SHA256 5c252a60092a78137d27fa05d621c509c7ad714110c888e1b58a973005b29095
MD5 9878fa7792537291abe5b91fe4677806
BLAKE2b-256 0b7a232980df7e272899ab62c43e86a38185f77312c6ee53ed7fe3283681fb45

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for safir-6.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 714f2f55c989551c209b31db681fe5d57ae1100bb24c97d9608c855c338bbb12
MD5 1175dbda9a85498d705c9ba0a3683a26
BLAKE2b-256 725953c956a4214f46da0ae9f44befcffd1d39c2897cb57a7957ff0c711707b0

See more details on using hashes here.

Supported by

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