🎉 svc-infra v1.0 is here — Production-ready backend infrastructure
What's new
nfrax logonfrax

Infrastructure that just works. Ship products, not boilerplate.

Frameworks

  • svc-infra
  • ai-infra
  • fin-infra
  • robo-infra

Resources

  • Getting Started
  • What's New
  • Contributing

Community

  • GitHub

© 2026 nfrax. All rights reserved.

nfrax logonfrax
Start HereWhat's New
GitHub
svc-infra

API Reference

Auto-generated API documentation from Python docstrings. Browse classes by category or search for specific functionality.

23 classes•113 methods•33 async•8 categories

Core

3
websocket.manager
class
ConnectionManager
12
()
Server-side WebSocket connection manager
health
class
HealthRegistry
6
()
Registry of health checks for a service
websocket.client
class
WebSocketClient
6
(url: str, config: WebSocketConfig | None, headers: dict[str, str] | None, ...)
Async WebSocket client for connecting to external services

API

3
api.fastapi.auth.policy
class
AuthPolicy
3 async3
Protocol defining authentication policy interface
api.fastapi.auth.policy
class
DefaultAuthPolicy
3 async3
(settings)
Default authentication policy implementation
api.fastapi
class
DualAPIRouter
10
(args, redirect_slashes: bool, kwargs)
Registers two routes per endpoint:

Billing

1
billing.async_service
class
AsyncBillingService
4 async4
(session: AsyncSession, tenant_id: str)
Async billing service for usage tracking and invoicing

Cache

1
cache.resources
class
Resource
2
(name: str, id_field: str)
Resource-based cache management helper

Database

5
db.nosql.repository
class
NoSqlRepository
9 async9
(collection_name: str, id_field: str, soft_delete: bool, ...)
Very small async repository for Mongo-like document stores (Motor)
db.nosql.resource
class
NoSqlResource
1
(collection: str | None, prefix: str, document_model: type[Any] | None, ...)
Mongo resource declaration used by API & CLI
db.nosql.service
class
NoSqlService
11
(repo: NoSqlRepository)
Small orchestration layer mirroring SqlService
db.sql.repository
class
SqlRepository
9 async9
(model: type[Any], id_attr: str, soft_delete: bool, ...)
Very small async repository around a mapped SQLAlchemy model
db.sql.service
class
SqlService
11
(repo: SqlRepository)
Small orchestration layer

Jobs & Queues

5
jobs.queue
class
InMemoryJobQueue
4
()
Simple in-memory queue for tests and local runs
jobs.scheduler
class
InMemoryScheduler
2 async3
(tick_interval: float)
Interval-based scheduler for simple periodic tasks (tests/local)
jobs.queue
class
JobQueue
4
Protocol defining a background job queue interface
jobs.redis_queue
class
RedisJobQueue
4
(client: Redis, prefix: str, visibility_timeout: int)
Redis-backed job queue with visibility timeout and delayed retries
jobs.runner
class
WorkerRunner
1 async2
(queue: JobQueue, handler: ProcessFunc, poll_interval: float)
Cooperative worker loop with graceful stop

Loaders

4
loaders.base
class
BaseLoader
3
(on_error: ErrorStrategy)
Abstract base class for content loaders
loaders
class
GitHubLoader
1 async1
(repo: str, path: str, branch: str, ...)
Load files from a GitHub repository
loaders.models
class
LoadedContent
3
(content: str, metadata: dict[str, Any], source: str, ...)
Content loaded from a remote or local source
loaders
class
URLLoader
1 async1
(urls: str | list[str], headers: dict[str, str] | None, extract_text: bool, ...)
Load content from one or more URLs

Webhooks

1
webhooks.service
class
WebhookService
1
(outbox: OutboxStore, subs: InMemoryWebhookSubscriptions)