Fluvius Framework
Domain-Driven APIs with Python
Build scalable, maintainable backend applications with CQRS, event sourcing, and seamless FastAPI integration. Production-ready framework designed for modern Python applications.
Powerful Features for Modern Applications
Everything you need to build scalable, maintainable backend applications with Python
Domain-Driven Design
Organize your application around business domains with clear boundaries, aggregates, and ubiquitous language. Build maintainable systems that reflect your business logic.
CQRS & Event Sourcing
Separate read and write operations for optimal performance. Automatically generate and store immutable events, enabling time travel, audit trails, and event replay.
FastAPI Integration
Automatically expose your domains as REST APIs with OpenAPI documentation, authentication, and authorization. Build production-ready APIs in minutes.
Multiple Data Backends
Choose from PostgreSQL, MongoDB, SQLite, or in-memory storage. Switch backends without changing your code thanks to our unified data access layer.
Background Workers
Process tasks asynchronously with ARQ integration. Schedule cron jobs, track job status, and build distributed task processing systems.
Flexible Querying
Build complex queries with type-safe filtering, sorting, and pagination. Support for nested conditions, field selection, and frontend query translation.
How It Works
Fluvius Framework follows Domain-Driven Design principles with CQRS and Event Sourcing
Commands
Define commands that represent user intentions to change state
Events
Events are automatically generated and stored as immutable facts
State
Query current state through optimized read models
Complete Event Sourcing
Every state change is recorded as an event. Replay events to rebuild state, audit changes, and enable time travel debugging.
- Immutable event log
- Automatic event generation
- Event replay and time travel
Comprehensive Module Ecosystem
Modular architecture with specialized modules for every aspect of your application
Domain
Core domain logic with aggregates, commands, and events
Data
Unified data access layer with multiple backend support
FastAPI
REST API generation with authentication and OpenAPI docs
Query
Type-safe query builder with filtering and pagination
Worker
Background job processing with ARQ and cron support
Casbin
Policy-based authorization with flexible access control
Domain-Driven. Event-Sourced. Production-Ready.
Build scalable backends with Python and modern architecture patterns. Get started in minutes with our intuitive API.
import sqlalchemy as safrom fluvius.data import SqlaDataSchema, SqlaDriver, DataAccessManagerfrom sqlalchemy.dialects import postgresql as pgfrom fluvius.data import UUID_GENRclass UserConnector(SqlaDriver):__db_dsn__ = "postgresql+asyncpg://postgres:postgres@localhost:5432/postgres"class User(UserConnector.__data_schema_base__):__tablename__ = "user"_id = sa.Column(pg.UUID, primary_key=True, default=UUID_GENR)name = sa.Column(sa.String)_created = sa.Column(sa.DateTime(timezone=True))_updated = sa.Column(sa.DateTime(timezone=True))_etag = sa.Column(sa.String)_deleted = sa.Column(sa.DateTime(timezone=True))_creator = sa.Column(pg.UUID)_updater = sa.Column(pg.UUID)_realm = sa.Column(sa.String)class FluviusAccessManager(DataAccessManager):__connector__ = UserConnector__automodel__ = True
Fast Development
Define your domain model and get REST APIs, event sourcing, and state management automatically
Type Safe
Full type safety with Pydantic models and Python type hints. Catch errors at development time
Scalable
CQRS pattern separates reads and writes. Scale your read and write operations independently
Perfect For
Fluvius Framework powers a wide range of applications across industries
Enterprise APIs
Build scalable REST APIs for enterprise applications with built-in authentication, authorization, and audit trails.
Microservices
Create domain-driven microservices with event sourcing for distributed systems and event-driven architectures.
SaaS Platforms
Develop multi-tenant SaaS applications with flexible data backends and background job processing.
Financial Systems
Build secure financial applications with immutable event logs, audit trails, and transaction management.
Why Developers Choose Fluvius
Built with developer experience and production requirements in mind
Rapid Development
Get from concept to production faster with automatic API generation and built-in patterns
Production Ready
Built-in authentication, authorization, logging, and monitoring for enterprise applications
Type Safety
Full type safety with Pydantic models and Python type hints. Catch errors early
Flexible Architecture
Modular design lets you use only what you need. Easy to extend and customize
Event Sourcing
Complete audit trail, time travel debugging, and event replay capabilities
Multiple Databases
Support for PostgreSQL, MongoDB, SQLite. Switch backends without code changes
Async First
Built on async/await for high performance and scalability
Great Documentation
Comprehensive docs, examples, and API references to get you started quickly
Ready to Build Something Amazing?
Start building domain-driven, event-sourced applications with Fluvius Framework today
Join developers building scalable Python backends with modern architecture patterns
Install in Minutes
pip install fluvius-py
Comprehensive Docs
Examples, guides, and API reference
Community Support
GitHub discussions and issues