Metadata-Version: 2.3
Name: fastloom
Version: 0.3.9
Summary: Core package
Requires-Python: >=3.12,<3.13
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Provides-Extra: celery
Provides-Extra: dev
Provides-Extra: fastapi
Provides-Extra: httpx
Provides-Extra: mongodb
Provides-Extra: openai
Provides-Extra: rabbit
Provides-Extra: redis
Provides-Extra: requests
Requires-Dist: babel (>=2.17.0,<3.0.0)
Requires-Dist: beanie (>=2.0.0,<3.0.0) ; extra == "mongodb"
Requires-Dist: celery (>=5.5.3,<6.0.0) ; extra == "celery"
Requires-Dist: fastapi (>=0,<1) ; extra == "fastapi" or extra == "rabbit"
Requires-Dist: faststream[otel,rabbit] (>=0.5.28,<0.6.0) ; extra == "rabbit"
Requires-Dist: httpx (>=0.28.0,<0.29.0) ; extra == "httpx"
Requires-Dist: ipykernel (>=6.30.0,<7.0.0) ; extra == "dev"
Requires-Dist: jdatetime (>=4.1.1,<5.0.0)
Requires-Dist: jinja2 (>=3.1.6,<4.0.0)
Requires-Dist: logfire[asgi,celery,fastapi,httpx,openai,pymongo,redis,requests,system-metrics] (>=4.0.0,<5.0.0)
Requires-Dist: mypy (>=1.17.0,<2.0.0) ; extra == "dev"
Requires-Dist: openai (>=1,<2) ; extra == "openai"
Requires-Dist: opentelemetry-distro
Requires-Dist: opentelemetry-exporter-otlp
Requires-Dist: opentelemetry-instrumentation-aio-pika ; extra == "rabbit"
Requires-Dist: orjson (==3.10.14)
Requires-Dist: pre-commit (>=4.2.0,<5.0.0) ; extra == "dev"
Requires-Dist: pydantic[email] (>=2.11,<3.0)
Requires-Dist: python-jose (>=3.5.0,<4.0.0)
Requires-Dist: python-multipart ; extra == "fastapi"
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
Requires-Dist: redis-om (>=1.0,<2.0) ; extra == "redis"
Requires-Dist: requests (>=2.32.0,<3.0.0) ; extra == "requests"
Requires-Dist: ruff (>=0.12.5,<0.13.0) ; extra == "dev"
Requires-Dist: sentry-sdk[fastapi] (>=2.0.0,<3.0.0)
Requires-Dist: uvicorn (>=0.35.0,<0.36.0) ; extra == "fastapi" or extra == "rabbit"
Description-Content-Type: text/markdown

# 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 Core.
- Composable: opt into only what you need (`FastAPI`, `Rabbit`, `MongoDB`, `Redis`, `OpenAI`).
- 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)

Core 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

```bash
# Install core
poetry add core-bluprint -E FastAPI

# Scaffold a new service
launch init myservice --stack fastapi

# Run it
cd myservice
launch dev
```

See pyproject extras for the full list.

---

## What you get out of the box

- App orchestrator (`core_bluprint.launcher`)
  - Loads your routes, models, signals, and healthchecks
  - Exposes settings and health endpoints (public toggle)
- FastAPI-native
  - Dependency-injected request/tenant context and guards
  - Clear routing, OpenAPI, and dependency injection patterns
- Auth & Access
  - DI-based guards with OIDC token introspection
  - Pluggable PDP for ABAC/RBAC/ReBAC decisions
- Multi-tenancy
  - Tenant-aware DI context across web, DB, and messaging
  - Automatic per-tenant settings endpoint backed by DB + cache
- Database layer (MongoDB via Beanie)
  - Created/updated mixins, pagination utilities, typed helpers
  - Helper classes/methods for common patterns (queries, projections, pagination)
  - Auto model discovery for DB init
- Signals / Messaging (Rabbit via FastStream)
  - Event-driven publish/subscribe integration with DI and retries
  - Subscriber wiring and healthchecks
- Observability
  - OpenTelemetry distro + OTLP exporter, Logfire, Sentry (error/bug tracking)
- I18N
  - Exception handler and template utils with Babel/Jinja2
- Healthchecks
  - Automatic app/DB/messaging checks + system routes
- Pydantic-native schemas and validators
  - SchemaIn/Out validation for request/response contracts
  - Common types and validators (`core_bluprint.types`)

Dive deeper in the docs below.

---

## Documentation

- Auth → docs/auth.md
- Tenant → docs/tenant.md
- DB (Mongo/Beanie) → docs/db.md
- Signals (Rabbit) → docs/signals.md
- Observability → docs/observability.md
- File storage → docs/file.md
- I18N → docs/i18n.md
- Settings & Configs → docs/settings.md
- Launcher & App model → docs/launcher.md

---

## Roadmap

- More CLI scaffolds and blueprints.
- Automatic `pydantic ai` agentic tool creation from apis
- Migrate PDP to [`OPAL`](https://github.com/permitio/opal) [opa](https://github.com/open-policy-agent/opa) based

