PyFly Framework Documentation
Everything you need to build production-grade Python applications with PyFly.
All module guides are organized in the modules/ directory. Here's a quick reference:
| Guide |
Description |
| Core & Lifecycle |
Application bootstrap, startup sequence, configuration, profiles, banner |
| Dependency Injection |
Container, stereotypes, scopes, bean factories, conditional beans, lifecycle hooks |
| Configuration |
YAML/TOML config, profiles, property binding, environment variables |
| Error Handling |
Exception hierarchy, HTTP status mapping, structured error responses |
| Guide |
Description |
| Web Layer |
REST controllers, routing, parameter binding, middleware, CORS, OpenAPI |
| Validation |
Valid[T] annotation, Pydantic model validation, structured 422 errors |
| WebFilters |
Request/response filter chain — TransactionIdFilter, RequestLoggingFilter, SecurityHeadersFilter |
| Actuator |
Health checks, beans endpoint, environment info, loggers, metrics |
| Custom Actuator Endpoints |
Build your own actuator endpoints with the ActuatorEndpoint protocol |
| Guide |
Description |
| Data Commons |
Generic repository ports, derived query parsing, pagination, sorting, entity mapping — the shared layer for all data adapters |
| Data Relational (SQL) |
SQLAlchemy adapter — Repository[T, ID], specifications, transactions, custom queries |
| Data Document (MongoDB) |
MongoDB adapter — MongoRepository[T, ID], BaseDocument, Beanie ODM patterns |
| Guide |
Description |
| Messaging |
Kafka, RabbitMQ, in-memory broker, message publishing and consumption |
| Events (EDA) |
Event-driven architecture, domain events, application events, event bus |
| CQRS |
Command/Query separation, CommandBus/QueryBus pipeline, validation, authorization, caching |
| Guide |
Description |
| Transactional Engine |
SAGA and TCC distributed transaction patterns, compensation, recovery, saga composition |
| Guide |
Description |
| Security |
JWT authentication, password encoding, authorization, protected endpoints |
| Guide |
Description |
| Resilience |
Rate limiting, bulkhead, timeout, fallback patterns |
| HTTP Client |
Service client builder, circuit breaker, retry, declarative clients |
| Caching |
Cache decorators, Redis adapter, in-memory cache, cache management |
| Guide |
Description |
| Shell |
@shell_component, @shell_method, CommandLineRunner, ApplicationRunner, Click adapter |
| Guide |
Description |
| Admin Dashboard |
Embedded management dashboard with 15 views, SSE streams, server mode, custom view extensibility |
| Guide |
Description |
| Observability |
Prometheus metrics, OpenTelemetry tracing, structured logging, health checks |
| Scheduling |
Cron jobs, fixed-rate tasks, fixed-delay tasks, async execution |
| Guide |
Description |
| AOP |
Aspect-oriented programming, pointcuts, advice types, weaving |
| Testing |
Test fixtures, mock containers, event assertions, testing patterns |
Adapters are the concrete implementations behind PyFly's port contracts. Each adapter doc covers setup, configuration, and adapter-specific features.
Browse the full Adapter Catalog, or jump directly:
| Adapter |
Backend |
Module |
| SQLAlchemy |
PostgreSQL, MySQL, SQLite |
Data Relational |
| MongoDB |
MongoDB (Beanie ODM) |
Data Document |
| Starlette |
Starlette / Uvicorn |
Web |
| Kafka |
Apache Kafka (aiokafka) |
Messaging |
| RabbitMQ |
RabbitMQ (aio-pika) |
Messaging |
| Redis |
Redis (async) |
Caching |
| HTTPX |
HTTPX |
Client |
| Click |
Click 8.1+ |
Shell |
| Document |
Description |
| Versioning |
Release stages (SNAPSHOT, Milestone, RC, GA), PEP 440 mapping, version history |
| CLI Reference |
Command-line tools — new, run, info, doctor, db |
| Spring Boot Comparison |
Side-by-side concept mapping for Java developers |