Skip to content

alexmarco/turboapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TurboAPI

Python Version License Code Style Type Check

⚠️ WARNING: ALPHA STATUS ⚠️

This framework is under active development and is NOT recommended for production use.

  • API may change without notice
  • No stability guarantees
  • Missing critical production features
  • Use at your own risk

A modern web framework for Python inspired by FastAPI and Django, designed for high-performance enterprise applications with a focus on Developer Experience (DX).

πŸš€ Quick Start

Installation

# Install TurboAPI
pip install turboapi

# Or with uv (recommended)
uv add turboapi

Create Your First Project

# Create a new project
framework new my-project
cd my-project

# Create your first app
framework new-app users

# Run the development server
framework run

Basic Example

# apps/users/api.py
from turboapi.web import Controller, Get, Post
from turboapi.security import Authenticate, RequireRole

@Controller("/users")
class UserController:
    
    @Get("/")
    async def list_users(self) -> dict:
        return {"users": []}
    
    @Post("/")
    @Authenticate()
    @RequireRole("admin")
    async def create_user(self, user_data: dict) -> dict:
        return {"message": "User created", "user": user_data}

πŸ“š Documentation

Our documentation is organized in modular sections for easy navigation:

πŸ“‹ Project Documentation

πŸš€ Getting Started

πŸ”§ System Documentation

πŸ› οΈ Development Tools

✨ Key Features

πŸ—οΈ Framework Core

  • πŸ”§ Dependency Injection - Robust and flexible DI container
  • βš™οΈ Centralized Configuration - Based on pyproject.toml
  • πŸ” Automatic Discovery - Intelligent component scanning
  • 🌐 Web Decorators - Controllers and endpoints with FastAPI
  • πŸ’Ύ Data Layer - SQLAlchemy with Alembic migrations
  • ⚑ Task System - Background task queue
  • πŸ—„οΈ Cache System - Synchronous, asynchronous and hybrid caching
  • πŸ–₯️ CLI Tools - Project and application generation

πŸ” Security System

  • πŸ”‘ JWT Authentication - Access and refresh tokens
  • πŸ›‘οΈ Security Middleware - CORS, rate limiting, security headers
  • 🎭 RBAC Authorization - Role-based access control
  • πŸ”’ Session Management - Granular session control
  • πŸ”Œ OAuth2 Addons - Google, GitHub, Microsoft integration

πŸ“Š Observability System

  • πŸ“ Structured Logging - With structlog and advanced configuration
  • πŸ“ˆ Unified Metrics - OpenTelemetry with Prometheus export
  • πŸ” Distributed Tracing - Complete OpenTelemetry integration
  • ❀️ Health Checks - Diagnostic endpoints with Pydantic models
  • πŸ”Œ APM Addons - New Relic, DataDog, Elastic APM as separate addons

πŸ”Œ Extensibility

  • πŸ“¦ Addon System - Modular extensions for APM and OAuth2
  • 🎯 Plugin Architecture - Easy integration of third-party services
  • βš™οΈ Configuration Driven - Enable features through configuration

πŸ—οΈ Architecture

TurboAPI follows a modular architecture with clear separation of concerns:

src/turboapi/
β”œβ”€β”€ core/           # DI, configuration, discovery
β”œβ”€β”€ web/            # FastAPI integration, routing
β”œβ”€β”€ data/           # Database, migrations, repositories
β”œβ”€β”€ security/       # Authentication, authorization, middleware
β”œβ”€β”€ observability/  # Logging, metrics, tracing, health checks
β”œβ”€β”€ cache/          # Caching system and decorators
β”œβ”€β”€ tasks/          # Background task processing
└── cli/            # Command-line tools

πŸ§ͺ Testing

# Run all tests
uv run pytest

# Run with coverage
uv run pytest --cov=src/turboapi

# Run specific test categories
uv run pytest tests/test_security/
uv run pytest tests/test_observability/

πŸš€ Development

Setup Development Environment

# Clone the repository
git clone https://github.com/alexmarco/turboapi.git
cd turboapi

# Install dependencies
uv sync

# Run tests
uv run pytest

# Run linting
uv run ruff format .
uv run ruff check . --fix
uv run mypy .

Quality Gates

Before committing, ensure all quality gates pass:

# 1. Format code
uv run ruff format .

# 2. Fix linting issues
uv run ruff check . --fix

# 3. Type checking
uv run mypy .

# 4. Run tests
uv run pytest

πŸ“Š Project Status

βœ… Completed Systems (9/11)

  • Core Framework (DI, Configuration, Discovery)
  • Web Layer (FastAPI Integration, Routing)
  • Data Layer (SQLAlchemy, Migrations, Repositories)
  • CLI Tools (Project Generation, Commands)
  • Task System (Background Processing)
  • Cache System (Synchronous, Asynchronous, Hybrid)
  • Security System (JWT, RBAC, Middleware, OAuth2)
  • Observability System (Logging, Metrics, Tracing, Health Checks)
  • Documentation System (Modular Documentation)

🚧 In Progress

  • Performance Optimizations
  • Advanced Development Tools

πŸ“‹ Planned

  • Cloud Integrations (AWS, GCP, Azure)
  • Deployment Tools (Docker, Kubernetes)
  • Plugin Ecosystem

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run quality gates
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • FastAPI - For the excellent web framework foundation
  • Django - For architectural inspiration
  • Spring Boot - For the developer experience philosophy
  • OpenTelemetry - For the observability standards

πŸ“ž Support

  • πŸ“– Documentation - Comprehensive guides and references
  • πŸ› Issues - Report bugs and request features
  • πŸ’¬ Discussions - Community discussions
  • πŸ“§ Contact - Direct contact for questions

<<<<<<< HEAD

⚠️ RECUERDA: Este framework estÑ en estado ALPHA y NO es recomendado para producción ⚠️

GitHub Email

======= **Made with ❀️ for the Python community** >>>>>>> master

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors