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

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

⚠️ Development Status: This framework is currently in active development. 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

Features

Core Framework

  • Modern API patterns (FastAPI-style decorators)
  • GraphQL & WebSocket support
  • Event-driven architecture
  • Advanced database patterns
  • Type-safe queries and validation

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

Caching

  • Multi-level cache (Memory + Redis)
  • Cache tags and invalidation
  • Cache warming strategies
  • Distributed caching

Queue System

  • Distributed job queues
  • Job scheduling
  • Retry mechanisms
  • Dead letter queues
  • Queue monitoring

Developer Tools

  • Interactive debugger with breakpoints
  • Performance profiler
  • Code generation tools
  • Schema management
  • Migration tools

Observability

  • Distributed tracing
  • Metrics collection
  • Structured logging
  • Real-time monitoring
  • Health checks

CLI Tools

  • Development server
  • Database migrations
  • Code generation
  • Monitoring dashboard
  • Deployment management

Project Structure

zephyr/
├── zephyr/                # Main package
│   ├── core/             # Core components
│   │   ├── app.py       # Application class
│   │   ├── config.py    # Configuration
│   │   ├── context.py   # Request context
│   │   └── router.py    # URL routing
│   ├── security/        # Security components
│   │   ├── auth.py     # Authentication
│   │   ├── rbac.py     # Access control
│   │   └── rate_limit.py# Rate limiting
│   ├── db/             # Database components
│   │   ├── models.py   # ORM models
│   │   ├── query.py    # Query builder
│   │   └── pool.py     # Connection pool
│   ├── cache/          # Caching system
│   │   ├── memory.py   # Memory cache
│   │   └── redis.py    # Redis cache
│   ├── queue/          # Queue system
│   │   ├── memory.py   # Memory queue
│   │   └── redis.py    # Redis queue
│   ├── graphql/        # GraphQL support
│   ├── websockets/     # WebSocket support
│   └── tools/          # Developer tools
├── docs/               # Documentation
├── examples/           # Example code
└── deployment/         # Deployment configs

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 Application
from zephyr.core import Router
from zephyr.security import JWT, RateLimiter
from zephyr.cache import RedisCache
from zephyr.db import Database

# Create application
app = Application("myapp")

# Configure components
app.use_jwt(JWT(secret_key="your-secret"))
app.use_rate_limit(RateLimiter(requests=100, window=60))
app.use_cache(RedisCache(url="redis://localhost"))
app.use_database(Database(url="postgresql://localhost/myapp"))

# Define routes
router = Router()

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

@router.post("/items")
@jwt_required
async def create_item(item: Item):
    return await item.save()

app.add_router(router)

# Run the application
if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8000)

Visualizing Diagrams

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

  1. VS Code:

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

  3. Documentation Site:

Documentation

Links

Contributing

This framework developed by BBDevs.

License

Business Source License (BSL) 1.1

This software is licensed under the Business Source License 1.1. You may use this software for development and testing purposes. Commercial use requires a separate commercial license from BBDevs.

Key restrictions:

  • Allowed: Development, testing, evaluation, non-commercial use
  • Restricted: Commercial production use without license
  • Restricted: Creating competing frameworks or services
  • Restricted: Redistribution of source code

For commercial licensing, contact: licensing@bbdevs.com

See LICENSE for full terms.

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.dev2.tar.gz (464.6 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.dev2-py3-none-any.whl (216.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zephyr_py-0.1.0.dev2.tar.gz
  • Upload date:
  • Size: 464.6 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.dev2.tar.gz
Algorithm Hash digest
SHA256 744d6c4d4683b7c02bed04e4b71a8c0b73e76bb35db534d59e770e7337755e86
MD5 abed5ed7d10bbdeacc24011bdccc9118
BLAKE2b-256 b21a6c5c0537d788e4611f94df4856b44265040514f458012b364191562f7b22

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zephyr_py-0.1.0.dev2-py3-none-any.whl
  • Upload date:
  • Size: 216.7 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.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 1c654b09473229621b6a524ca69aa1c905c36ede8298c01781a68d5beaef7379
MD5 6b18e4e15bee98a3251d363228decc11
BLAKE2b-256 35870ccc904d7cdcfc9f6ce7eb941b7af482b330ec96379ffd3dc49dbd288a64

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