Skip to main content

Fastloom – The Open Foundation for Building Event-Driven Services

Fastloom is a lightweight, batteries-included foundation for building modern backends. Define your settings, schemas, and endpoints; Fastloom wires up the rest: FastAPI, Mongo (Beanie), Rabbit (FastStream), metrics/traces/logs/errors, and more.

Think of it as the glue for your stack: web, messaging, caching, DB, observability, and integrations with best-in-class tools.


Why Fastloom

  • No boilerplate: minimal scaffolding/templating; most wiring is handled inside the library.
  • Composable: opt into only what you need via extras (fastapi, rabbit, kafka, mongo, redis, mcp, celery, openai, policy).
  • Pydantic-first: type-safe models, validators, and clear input/output contracts.
  • Multi-tenant by design: tenant context flows through DI and storage.
  • AuthN/Z via DI: OIDC token introspection and pluggable PDP (ABAC/RBAC/ReBAC) hooks.
  • Event-driven ready: publish/subscribe with routing keys and health.
  • Observability-native: metrics, traces, logs from day one.
  • Self-hostable: production parity with a cloud/aaS setup.

Integrated Services (the platform)

Fastloom plugs into a family of self-hostable services:

  • IAM → OIDC/SSO, authN/Z, RBAC/ABAC/ReBAC.
  • Notify → realtime notifications, Pusher-compatible API.
  • Pulse → user activity + event tracking with OpenTelemetry hooks.
  • File → object storage on MinIO (S3-compatible).
  • Finance, Subscription, SMS/Email, Meet, Persona → optional services you can wire in.

Each service is:

  • self-hostable (Docker Compose or Helm),
  • BaaS-available.

Quick start

# Install fastloom with the extras you need
uv add "fastloom[fastapi,mongo,rabbit]"

A minimal service is two files at the project root — settings.py and app.py — plus a tenants.yaml for defaults:

# settings.py
from fastloom.db.settings import MongoSettings
from fastloom.launcher.settings import LauncherSettings
from fastloom.observability.settings import ObservabilitySettings
from fastloom.settings.general import BaseGeneralSettings
from fastloom.signals.rabbit.settings import RabbitmqSettings


class Settings(
    BaseGeneralSettings,
    LauncherSettings,
    MongoSettings,
    RabbitmqSettings,
    ObservabilitySettings,
): ...
# app.py
from fastapi import APIRouter

from fastloom.launcher.schemas import App

from my_service import models, signals

router = APIRouter()


@router.get("/ping")
async def ping() -> dict[str, str]:
    return {"pong": "ok"}


app = App(
    routes=[(router, "", "Health")],
    models_module=models,
    signals_module=signals,
)
# tenants.yaml
default:
    ENVIRONMENT: development
    PROJECT_NAME: my_service
    MONGO_URI: mongodb://localhost:27017
    MONGO_DATABASE: my_service
    RABBIT_URI: amqp://guest:guest@localhost:5672/

Run with the bundled CLI (registered as launch via [project.scripts]):

launch

See docs/quickstart.md for a fuller walkthrough.


What you get out of the box

  • App orchestrator (fastloom.launcher)
    • Discovers your routes, models, signals, and healthchecks from app.py / settings.py
    • Exposes settings and health endpoints (public toggle via LauncherSettings.SETTINGS_PUBLIC)
  • FastAPI-native
    • Dependency-injected request/tenant context and guards
    • Clear routing, OpenAPI, and dependency injection patterns
  • Auth & Access
    • DI-based guards with OIDC / OAuth2 token introspection
    • Optional IAM sidecar for introspection + ACL
  • Multi-tenancy
    • Tenant-aware DI context across web, DB, and messaging
    • Per-tenant settings endpoint backed by DB + cache, with tenants.yaml defaults
  • Database layer (MongoDB via Beanie)
    • Created/updated mixins, pagination utilities, typed helpers
    • Auto model discovery for DB init via App.models_module
  • Signals / Messaging (Rabbit + Kafka via FastStream)
    • Rabbit: event-driven publish/subscribe with retries and DLX-based backoff
    • Kafka: subscriber/publisher wiring for consuming topics (e.g. Debezium CDC), with NACK_ON_ERROR-backed exponential backoff by default
    • Subscriber wiring and healthchecks
    • Auto-streamed BaseDocumentSignal Beanie models
  • Observability
    • OpenTelemetry distro + OTLP exporter, Logfire, Sentry (errors + profiling)
  • I18N
    • Exception handler and template utils with Babel/Jinja2
  • Healthchecks
    • Automatic app/DB/messaging/cache checks + system routes
  • MCP
    • Optional FastMCP mount with bearer auth forwarding
  • Pydantic-native schemas and validators
    • Schema In/Out validation for request/response contracts
    • Common types and validators (fastloom.types)

Dive deeper in the docs below.


Documentation


Claude Code integration

If you build services on top of fastloom and use Claude Code, you can install the fastloom-sdk plugin. It bundles:

  • Scaffolding skills — scaffold-fastloom-service, add-fastloom-route, add-rabbit-subscriber.
  • Audit skill — audit-fastloom-settings flags misuse in your settings.py / tenants.yaml.
  • Reference skill — fastloom-reference ships the full docs/ so Claude can ground its answers in the canonical documentation instead of guessing from training data.
/plugin marketplace add aradng/FastLoom
/plugin install fastloom-sdk@fastloom

Skills auto-activate from context (e.g. asking "how does fastloom auth work?" triggers fastloom-reference); explicit invocation is /fastloom-sdk:<skill-name>. The plugin is opt-in per user and doesn't ship via PyPI — it's distributed through the marketplace in this same repo.


Roadmap

  • More CLI scaffolds and blueprints.
  • Automatic pydantic-ai agentic tool creation from APIs.
  • Migrate PDP to OPAL / opa based.

Metadata

Release files for fastloom 0.5.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastloom 0.5.6
File Size Uploaded
fastloom-0.5.6.tar.gz 54.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastloom 0.5.6
File Interpreter ABI Platform
fastloom-0.5.6-py3-none-any.whl Python 3 none any Details

Total release size: 137.9 kB

Release files / fastloom-0.5.6.tar.gz

Download URL fastloom-0.5.6.tar.gz
Size 54.7 kB
Tags Source
SHA-256 checksum
How to use checksums
aeec75301055c45bf21618ebfbf2aaa709f95dfc801890fae26eb8836ebf1ae2
BLAKE2b-256 checksum
How to use checksums
de94b227e9ec7d8ff37b2c59fc67b9ab081e8b96464d83e1209b51c7afcead3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fastloom-0.5.6-py3-none-any.whl

Download URL fastloom-0.5.6-py3-none-any.whl
Size 83.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0914b7f66187af59c9af436c4fc7b7c1657f6e09f3b6fb77b77d1a79a3cd8677
BLAKE2b-256 checksum
How to use checksums
6f4d422a562fde546e64fa47828aef3eba77bad42e250819b9d6462bc6234ec4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.5.9

2 release files

0.5.8

2 release files

0.5.7

2 release files

This release

0.5.6 This release

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.56

2 release files

0.4.55

2 release files

0.4.54

2 release files

0.4.53

2 release files

0.4.52

2 release files

0.4.51

2 release files

0.4.50

2 release files

0.4.48

2 release files

0.4.47

2 release files

0.4.46

2 release files

0.4.45

2 release files

0.4.44

2 release files

0.4.42

2 release files

0.4.39

2 release files

0.4.38

2 release files

0.4.37

2 release files

0.4.36

2 release files

0.4.35

2 release files

0.4.34

2 release files

0.4.33

2 release files

0.4.32

2 release files

0.4.31

2 release files

0.4.30

2 release files

0.4.29

2 release files

0.4.28

2 release files

0.4.25

2 release files

0.4.24

2 release files

0.4.23

2 release files

0.4.22

2 release files

0.4.21

2 release files

0.4.20

2 release files

0.4.17

2 release files

0.4.14

2 release files

0.4.13

2 release files

0.4.12

2 release files

0.4.11

2 release files

0.4.10

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.17

2 release files

0.3.16

2 release files

0.3.15

2 release files

0.3.14

2 release files

0.3.13

2 release files

0.3.12

2 release files

0.3.11

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page