Skip to content

Introduction

Zenith Framework

Python web framework with built-in features for rapid API development

Zenith is a modern Python web framework designed for building APIs quickly. It includes authentication, database models, and API documentation out of the box.

Fast to Code

Minimal configuration with sensible defaults.

Type Safe

Full type hints with Pydantic validation.

Batteries Included

Authentication, database, and documentation built-in.

Production Ready

Security middleware and monitoring included.

from zenith import Zenith
app = Zenith()
@app.get("/")
async def hello():
return {"message": "Hello from Zenith!"}

Database Models:

from zenith.db import ZenithModel
from sqlmodel import Field
from typing import Optional
class User(ZenithModel, table=True):
id: Optional[int] = Field(primary_key=True)
name: str = Field(max_length=100)
email: str = Field(unique=True)
active: bool = Field(default=True)
@app.get("/users")
async def list_users():
users = await User.where(active=True).order_by('-id').limit(10).all()
return {"users": [user.model_dump() for user in users]}
@app.post("/users")
async def create_user(user_data: dict):
user = await User.create(**user_data)
return {"user": user.model_dump()}

Built-in Features:

app = Zenith()
# Add authentication, admin panel, and API documentation
app.add_auth() # JWT authentication
app.add_admin() # Admin dashboard
app.add_api("My API", "1.0.0") # Adds /docs and /redoc endpoints
# Serve static files or SPA
app.spa("dist")
  • Minimal configuration - Sensible defaults that just work
  • Chainable queries - User.where().order_by().limit().all()
  • Automatic validation - Type-safe with Pydantic
  • Built-in auth - JWT authentication included
  • API documentation - Auto-generated OpenAPI docs
  • Database sessions - Automatic session management
  • Comprehensive testing - 899 tests with full coverage
  • High performance - 12,000+ requests per second
  • Security middleware - CORS, CSRF, security headers
  • Health monitoring - Built-in health checks and metrics
  • Background tasks - Async task processing
  • Static file serving - SPA and static file support
  1. Convention over configuration - Sensible defaults that work out of the box
  2. Type safety - Catch errors early with type hints and validation
  3. Performance - Fast by default without sacrificing features
  4. Batteries included - Common features built-in, not bolted on
  5. Production ready - Security and monitoring from the start

Installation

Install Zenith and set up your environment

Quick Start

Build your first API in 5 minutes

Documentation

Learn the framework concepts

Examples

Browse example applications