Skip to content

Latest commit

 

History

History

README.md

PyFly Logo

PyFly Framework Documentation

Everything you need to build production-grade Python applications with PyFly.


Getting Started

Guide Description
Introduction What is PyFly, philosophy, and why use it
Installation Install PyFly with the interactive installer or pip
Getting Started Tutorial Build your first PyFly application step by step
Architecture Overview Understand the framework's hexagonal design and module layers

Module Guides

All module guides are organized in the modules/ directory. Here's a quick reference:

Foundation

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

Web Development

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

Data & Persistence

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

Messaging & Events

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

Distributed Transactions

Guide Description
Transactional Engine SAGA and TCC distributed transaction patterns, compensation, recovery, saga composition

Security

Guide Description
Security JWT authentication, password encoding, authorization, protected endpoints

Resilience & Performance

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

CLI & Shell

Guide Description
Shell @shell_component, @shell_method, CommandLineRunner, ApplicationRunner, Click adapter

Administration

Guide Description
Admin Dashboard Embedded management dashboard with 15 views, SSE streams, server mode, custom view extensibility

Operations

Guide Description
Observability Prometheus metrics, OpenTelemetry tracing, structured logging, health checks
Scheduling Cron jobs, fixed-rate tasks, fixed-delay tasks, async execution

Advanced

Guide Description
AOP Aspect-oriented programming, pointcuts, advice types, weaving
Testing Test fixtures, mock containers, event assertions, testing patterns

Adapter Reference

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

Reference

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

Quick Links