svc-infra

svc-infra

New

Infrastructure for building and deploying prod-ready services

svc-infra is a comprehensive Python package that provides all the backend primitives you need to build production-ready services. It's designed to be reusable across many applications and teams.

Features

Quick Start

python
from svc_infra import easy_service_app
from svc_infra.logging import setup_logging
from svc_infra.cache import init_cache

# Setup logging
setup_logging()

# Create FastAPI app with all infra configured
app = easy_service_app(name="MyService")

# Initialize cache
await init_cache(url="redis://localhost")

@app.get("/health")
async def health():
    return {"status": "healthy"}

Installation

bash
pip install svc-infra

With extras:

bash
pip install svc-infra[pg,redis,payments]

Architecture

mermaid
graph TB
    subgraph "svc-infra"
        API[API Framework]
        Auth[Authentication]
        DB[Database]
        Cache[Caching]
        Jobs[Background Jobs]
        Webhooks[Webhooks]
        Obs[Observability]
    end

    App[Your Application] --> API
    API --> Auth
    API --> DB
    API --> Cache
    API --> Jobs
    API --> Webhooks
    API --> Obs

License

MIT License - see LICENSE for details.