Skip to content

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

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages