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
- Integrating with Kafka
- Using the Kubernetes API
- Application metrics
- 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
- Using the asyncio multiple-reader queue
- Building UWS applications
API¶
- API reference
- safir Module
- safir.arq Package
- safir.arq.uws Module
- safir.asyncio Package
- safir.click Package
- safir.database Package
- safir.datetime Package
- safir.dependencies.arq Module
- safir.dependencies.db_session Module
- safir.dependencies.gafaelfawr Module
- safir.dependencies.http_client Module
- safir.dependencies.logger Module
- safir.dependencies.metrics Module
- safir.fastapi Package
- safir.gcs Package
- safir.github Package
- safir.github.models Module
- safir.github.webhooks Module
- safir.kafka Package
- safir.kubernetes Package
- safir.logging Package
- safir.metadata Package
- safir.metrics Package
- safir.models Package
- safir.middleware.ivoa Module
- safir.middleware.x_forwarded Module
- safir.pydantic Package
- safir.redis Package
- safir.slack.blockkit Module
- safir.slack.webhook Module
- safir.testing.gcs Module
- safir.testing.kubernetes Module
- safir.testing.slack Module
- safir.testing.uvicorn Module
- safir.testing.uws Module
- safir.uws Package