Skip to main content

A modern, high-performance Python web framework with advanced developer tools and enterprise-grade capabilities

Project description

Zephyr Framework

PyPI version Python versions Downloads License

A modern, high-performance Python web framework with advanced developer tools and enterprise-grade capabilities.

⚠️ Development Status: This framework is currently in active development (v0.1.0-dev0). APIs may change between releases. Use in production at your own risk.

Architecture

graph TD
    A[Application] --> B[Core]
    A --> C[Security]
    A --> D[Database]
    B --> E[Router]
    B --> F[Middleware]
    B --> G[Events]
    C --> H[Auth]
    C --> I[RBAC]
    C --> J[Rate Limit]
    D --> K[ORM]
    D --> L[Migration]
    D --> M[Pool]
    style A fill:#f9f,stroke:#333,stroke-width:2px
    style B,C,D fill:#bbf,stroke:#333,stroke-width:2px
    style E,F,G,H,I,J,K,L,M fill:#dfd,stroke:#333,stroke-width:2px

Current Features

Core Framework ✅

  • Modern API patterns (FastAPI-style decorators)
  • ASGI-compliant application structure
  • HTTP routing system (GET, POST, PUT, DELETE)
  • Request/Response handling
  • Path parameter extraction
  • Type-safe request/response models

Development Tools ✅

  • Colored logging system
  • Basic CLI framework
  • Project structure and configuration

Planned Features

Security 🚧

  • JWT Authentication
  • Role-Based Access Control (RBAC)
  • Redis-based Rate Limiting
  • CSRF Protection
  • Security Headers

Database 🚧

  • Advanced ORM with type safety
  • Query builder with joins
  • Migration system
  • Connection pooling
  • Read/write splitting

Advanced Features 🚧

  • GraphQL & WebSocket support
  • Event-driven architecture
  • Multi-level caching (Memory + Redis)
  • Distributed job queues
  • Interactive debugger with breakpoints
  • Performance profiler
  • Distributed tracing and monitoring

Installation

Using uv (Recommended)

uv is an extremely fast Python package and project manager written in Rust. It's 10-100x faster than pip and provides a unified toolchain.

Install uv:

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

# Or via pip/pipx
pip install uv

Install Zephyr:

# Create virtual environment and install
uv venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
uv pip install zephyr-py

# With performance optimizations
uv pip install zephyr-py[performance]

# With all dev tools
uv pip install zephyr-py[dev]

Using pip

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

# Install package
pip install zephyr-py

# With optional dependencies
pip install zephyr-py[performance]  # Performance optimizations
pip install zephyr-py[dev]          # Development tools

Requirements

  • Python 3.11 or higher
  • Modern async/await support

Quick Start

from zephyr import Zephyr
from zephyr.core import Router

# Create application
app = Zephyr()

# Create router
router = Router()

@router.get("/")
async def hello():
    return {"message": "Hello from Zephyr!"}

@router.get("/users/{user_id}")
async def get_user(user_id: int):
    return {"user_id": user_id, "name": f"User {user_id}"}

@router.post("/items")
async def create_item(data: dict):
    return {"created": True, "data": data}

# Add router to app
app.add_router(router)

# Run with ASGI server (uvicorn, hypercorn, etc.)
if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

Visualizing Diagrams

The documentation includes Mermaid diagrams which can be viewed in several ways:

  1. GitHub: Diagrams are automatically rendered in GitHub markdown.

  2. VS Code:

    • Install the "Markdown Preview Mermaid Support" extension
    • Open markdown file and press Ctrl+Shift+V to preview
  3. Mermaid Live Editor:

  4. Documentation Site:

Documentation

Links

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE for details.

Changelog

See CHANGELOG.md for version history and release notes.

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

zephyr_py-0.1.0.dev0.tar.gz (425.4 kB view details)

Uploaded Source

Built Distribution

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

zephyr_py-0.1.0.dev0-py3-none-any.whl (200.3 kB view details)

Uploaded Python 3

File details

Details for the file zephyr_py-0.1.0.dev0.tar.gz.

File metadata

  • Download URL: zephyr_py-0.1.0.dev0.tar.gz
  • Upload date:
  • Size: 425.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for zephyr_py-0.1.0.dev0.tar.gz
Algorithm Hash digest
SHA256 40e19036ef9e9bbc110978d8614a37a86daea1b89592cba7ef70fb9549e1b954
MD5 47d13b22d263b650e3dadc2fdcc27457
BLAKE2b-256 ccfd6aa5ff5741f805bdb70ff77332c0cab94a89b221f8bdc4cc87eee97cc035

See more details on using hashes here.

File details

Details for the file zephyr_py-0.1.0.dev0-py3-none-any.whl.

File metadata

  • Download URL: zephyr_py-0.1.0.dev0-py3-none-any.whl
  • Upload date:
  • Size: 200.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for zephyr_py-0.1.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff4c665ad32347be426228c6ffc61db2548856b0dd4b0715cb2a1a9d54cfbc74
MD5 ddd0087f84265fa7c36095e285417840
BLAKE2b-256 0a2fb5a59742e226e1ba31213f66616e585af275b7b5a2b85bdcaf314bc811f4

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