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.dev3.tar.gz (2.6 MB 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.dev3-py3-none-any.whl (302.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zephyr_py-0.1.0.dev3.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • 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.dev3.tar.gz
Algorithm Hash digest
SHA256 6ecd7c37ced3e9cf8f625282b6aeb6cc891461087200ac2d91b098374c66778e
MD5 62a7c101b603cfe3780658ca1fde211e
BLAKE2b-256 2396ec4dc13a2fed7a8183511462a8ae3f2655418cf972267a199c3c17dafabb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zephyr_py-0.1.0.dev3-py3-none-any.whl
  • Upload date:
  • Size: 302.4 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.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 c7abb983994e6622844700fc9fcb9f19fd35b227ac6bfe2ff315db8e8e64b078
MD5 dcd70330085394a3c25168ed027eb399
BLAKE2b-256 87110acc8004d0e42860fec1394d4c825e2728cd2f5c4a669b97d608e3793d9a

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