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 developed on GitHub at lsst-sqre/safir and is available on PyPI.
User guide#
- User guide
- Creating an app from the template
- Logging in Safir applications
- Using the HTTPX client
- Using the database API
- Using the arq Redis queue client and dependency
- Requiring Gafaelfawr authentication
- Handling
X-Forwarded-*
headers - IVOA protocol support
- Using the Kubernetes API
- Utilities for Pydantic models
- Storing Pydantic objects in Redis
- Using the Google Cloud Storage API
- Handling HTTP errors with FastAPI
- datetime handling
- Starting an app with Uvicorn for testing
- Sending messages and alerts to a Slack webhook
- Building GitHub integrations
- Using Click for command-line interfaces
API#
- API reference
- safir Package
- safir.arq Module
- safir.asyncio Module
- safir.click Module
- safir.database Module
- safir.datetime Module
- safir.dependencies.arq Module
- safir.dependencies.db_session Module
- safir.dependencies.gafaelfawr Module
- safir.dependencies.http_client Module
- safir.dependencies.logger Module
- safir.fastapi Module
- safir.gcs Module
- safir.github Package
- safir.github.models Module
- safir.github.webhooks Module
- safir.kubernetes Module
- safir.logging Module
- safir.metadata Module
- safir.models Module
- safir.middleware.ivoa Module
- safir.middleware.x_forwarded Module
- safir.pydantic Module
- safir.redis Module
- safir.slack.blockkit Module
- safir.slack.webhook Module
- safir.testing.gcs Module
- safir.testing.kubernetes Module
- safir.testing.slack Module
- safir.testing.uvicorn Module