Skip to main content

Velox Framework - A modern, high-performance Python backend framework

Project description

Velox Framework

PyPI version Python 3.12+ License: MIT Tests Coverage

Velox (Advanced Network Application Layer) is a modern, high-performance Python backend framework designed for building scalable web applications and APIs. It combines the best features of Django, FastAPI, and Laravel while maintaining clean architecture principles and async-first design.

โšก Quick Start

Installation

pip install velox-framework

Create Your First Project

# Create a new project
velox-admin startproject myproject
cd myproject

# Create your first app
velox-admin startapp blog

# Run development server
velox-admin runserver

Hello World Example

from velox import Velox, Controller, route
from velox.http import JsonResponse

app = Velox()

@app.route('/')
async def hello_world(request):
    return JsonResponse({'message': 'Hello, World!'})

class BlogController(Controller):
    @route.get('/posts')
    async def list_posts(self, request):
        return JsonResponse({'posts': []})
    
    @route.post('/posts')
    async def create_post(self, request):
        data = await request.json()
        # Auto-validation with Pydantic models
        return JsonResponse({'created': True})

if __name__ == '__main__':
    app.run(debug=True)

๐Ÿš€ Key Features

๐Ÿ—๏ธ Clean Architecture & DDD

  • Domain-driven design patterns
  • Dependency injection container
  • Clean separation of concerns
  • Testable and maintainable code

โšก Async-First Performance

  • Native async/await support
  • High-performance ASGI server
  • Connection pooling
  • Background task processing

๐Ÿ—„๏ธ Powerful ORM

  • Database-agnostic design
  • Support for PostgreSQL, MySQL, SQLite, MongoDB
  • Async queries and migrations
  • Relationship management

๐Ÿ›ก๏ธ Security Built-In

  • JWT/OAuth2 authentication
  • CSRF/XSS protection
  • Rate limiting
  • Input validation and sanitization

๐Ÿ”Œ API Generation

  • Auto-generated REST APIs
  • GraphQL support
  • OpenAPI/Swagger documentation
  • API versioning

๐ŸŽจ Rich Feature Set

  • Admin panel with auto-generated UI
  • Template engine (Jinja2)
  • Middleware system
  • WebSocket support
  • Internationalization (i18n)
  • Background jobs and scheduling
  • Real-time capabilities

๐Ÿ“š Documentation

๐Ÿ›๏ธ Architecture

Velox follows Clean Architecture principles with clear separation between layers:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚         Presentation Layer              โ”‚ โ† Controllers, Views, API
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚         Application Layer               โ”‚ โ† Use Cases, Services
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚            Domain Layer                 โ”‚ โ† Entities, Value Objects
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚       Infrastructure Layer              โ”‚ โ† Database, External APIs
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŽฏ Performance

  • High throughput: 40,000+ requests/second
  • Low latency: Sub-millisecond response times
  • Memory efficient: Optimized for containerized deployments
  • Scalable: Horizontal scaling support

๐Ÿ› ๏ธ Development Tools

CLI Commands

# Project management
velox-admin startproject myproject
velox-admin startapp myapp

# Database operations
velox-admin makemigrations
velox-admin migrate
velox-admin shell

# Development server
velox-admin runserver --reload
velox-admin runserver --workers 4

# Testing and deployment
velox-admin test
velox-admin collectstatic
velox-admin deploy

Development Features

  • Hot reloading
  • Interactive shell
  • Database migrations
  • Test utilities
  • Static file handling
  • Docker integration

๐ŸŒ Ecosystem

Built-in Apps

  • velox.auth - Authentication and authorization
  • velox.admin - Auto-generated admin interface
  • velox.api - REST and GraphQL API generation
  • velox.files - File upload and management
  • velox.cache - Multi-level caching
  • velox.tasks - Background job processing

Third-party Packages

  • velox-cms - Content management system
  • velox-ecommerce - E-commerce functionality
  • velox-analytics - Analytics and monitoring
  • velox-payments - Payment processing
  • velox-social - Social authentication

๐Ÿ“ˆ Comparison

Feature Velox Django FastAPI Laravel
Async Support โœ… Native โš ๏ธ Partial โœ… Native โŒ No
Performance โšก Very High ๐Ÿ”ฅ Medium โšก Very High ๐Ÿ”ฅ Medium
Learning Curve ๐Ÿ“ˆ Gentle ๐Ÿ“ˆ Steep ๐Ÿ“ˆ Medium ๐Ÿ“ˆ Gentle
Auto API Docs โœ… Yes โŒ No โœ… Yes โš ๏ธ Manual
Admin Panel โœ… Built-in โœ… Built-in โŒ No โŒ No
ORM โœ… Advanced โœ… Good โŒ No โœ… Eloquent
Type Safety โœ… Full โš ๏ธ Partial โœ… Full โŒ No

๐Ÿค Contributing

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

Development Setup

git clone https://github.com/veloxframework/velox.git
cd velox
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -e ".[dev]"
pre-commit install
pytest

๐Ÿ“ License

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

๐Ÿ™ Acknowledgments

  • Inspired by Django's batteries-included philosophy
  • Built on the async foundation of FastAPI
  • Influenced by Laravel's elegant developer experience
  • Powered by modern Python 3.12+ features

๐ŸŽ‰ Community


Made with โค๏ธ by the Velox Framework Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

velox_framework-0.1.0.tar.gz (79.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

velox_framework-0.1.0-py3-none-any.whl (92.5 kB view details)

Uploaded Python 3

File details

Details for the file velox_framework-0.1.0.tar.gz.

File metadata

  • Download URL: velox_framework-0.1.0.tar.gz
  • Upload date:
  • Size: 79.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for velox_framework-0.1.0.tar.gz
Algorithm Hash digest
SHA256 76d6cd5338e4f41ddee4a18033ed94bc0be23da4ddf169f8e30406a3124a1df6
MD5 09bf22a4259f4550db17be484de797bc
BLAKE2b-256 0c30c37f5223e48d8a618a74c81c27b634dc3bc51110e0c4590052be957f13a4

See more details on using hashes here.

File details

Details for the file velox_framework-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for velox_framework-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8540260ed68d412a95489c6767efd4103cbe0a1f82c765575a15fdde4db851c6
MD5 6e11b963417216c90064473f3a71c3ae
BLAKE2b-256 85f619a568a8ed637beb0dead139567579d30e1afe2d2b6135baccdc5b83e012

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page