Skip to main content

Advanced Network Application Layer - A modern Python backend framework

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

ANAL Framework

PyPI version Python 3.12+ License: MIT Tests Coverage

ANAL (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 anal-framework

Create Your First Project

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

# Create your first app
anal-admin startapp blog

# Run development server
anal-admin runserver

Hello World Example

from anal import ANAL, Controller, route
from anal.http import JsonResponse

app = ANAL()

@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

ANAL 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
anal-admin startproject myproject
anal-admin startapp myapp

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

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

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

Development Features

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

๐ŸŒ Ecosystem

Built-in Apps

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

Third-party Packages

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

๐Ÿ“ˆ Comparison

Feature ANAL 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/analframework/anal.git
cd anal
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 ANAL 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

anal_framework-0.1.0.tar.gz (79.8 kB view details)

Uploaded Source

Built Distribution

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

anal_framework-0.1.0-py3-none-any.whl (93.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for anal_framework-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5208bcb997cc889553cb4a18ba59fccb7bb0aaeccab64c6438cd82d2f0edfde7
MD5 5090a2755b50d18da9c52998f789725e
BLAKE2b-256 10da12339aea8276c50ec15e3cef28d32b93037f430fb5cb8ab78627d20dd9d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: anal_framework-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 93.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for anal_framework-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62b70e2c42fbf1c131b73d0aec5873ebf3e8f0e6626a960cdb6d51b8e427b4f3
MD5 1b57a3e006050d1989e2e8b6d5742904
BLAKE2b-256 b870151da9553c891b8494c329310d0e541ff1ef305f5d05da576a5c8fd4c7f3

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