Skip to main content

Extremely Stupid Simple, Blazing Fast, Get Out of your way immediately Microframework for building Python Web Applications.

Project description

Heaven ⚡ :

Heaven is the absolute minimal, insanely fast ASGI web framework for Python purists. It doesn't just get out of your way; it vanishes, leaving you with raw performance and total control.

"Mastery in 30 minutes or less. No grey spots, just pure Python."


Why Heaven?

Feature Heaven FastAPI Flask Django
Learning Curve 30 Mins High Low Extreme
Performance ⚡⚡⚡ ⚡⚡ 🐢
Boilerplate Zero Medium Low Massive
Mastery Complete Partial High Low
Background Jobs Native (Daemons) External External External
  1. Stupid Simple: Built for engineers who hate bloat. If you know Python, you already know Heaven.
  2. Blazing Fast: A thin layer over ASGI, optimized for high-concurrency and low-latency.
  3. Batteries Included (The right ones): Native support for application mounting, centralized hooks (.BEFORE/.AFTER), and powerful background Daemons.
  4. Transparent: No magic decorators that hide logic. Just clear, explicit routing.

Quickstart in 60 Seconds

  1. Install
$ pip install heaven
  1. Code
from heaven import App, Request, Response, Context

app = App()

# Centralized Auth / Pre-processing
async def auth(req, res, ctx):
    if not req.headers.get('Authorization'):
        res.status = 401
        res.abort('Unauthorized')

app.BEFORE('/api/*', auth)

# Simple Handler
async def welcome(req, res, ctx):
    res.body = {"message": "Welcome to Heaven"}

app.GET('/api/v1/welcome', welcome)

3. **Protect** (Automatic OpenAPI)
```python
from heaven import Schema

class User(Schema):
    name: str

app.schema.POST('/user', expects=User, summary="Create User")
app.DOCS('/docs')
  1. Fly (CLI) Heaven comes with a beautiful, zero-config CLI.
pip install heaven

# Auto-discovery & run with reload
heaven fly

# Visualize your API structure
heaven routes
  1. Daemon (Background)
async def pulse(app):
    print("Heartbeat...")
    return 5 # Run every 5 seconds

app.daemons = pulse
  1. Run (Standard)
$ uvicorn app:app --reload

Contributing

We love builders. See the Contribution Guidelines.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

heaven-1.4.1.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

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

heaven-1.4.1-py3-none-any.whl (37.7 kB view details)

Uploaded Python 3

File details

Details for the file heaven-1.4.1.tar.gz.

File metadata

  • Download URL: heaven-1.4.1.tar.gz
  • Upload date:
  • Size: 33.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/6.17.0-20-generic

File hashes

Hashes for heaven-1.4.1.tar.gz
Algorithm Hash digest
SHA256 ee10010e7b0d00ec7e791e542c104674ba423945a8090fdcd07cbde7047252c8
MD5 aacd6adf8cbe8269398f4eca798f6ea5
BLAKE2b-256 4686a2b5bf4fde3f2c42ae0cc2205eaba5e16d42e3db86cfe534f11444645452

See more details on using hashes here.

File details

Details for the file heaven-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: heaven-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 37.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/6.17.0-20-generic

File hashes

Hashes for heaven-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b6f9a4f2006bc174d2c72dd240bb17af269c22592c40babe09c9b4264897492b
MD5 6ffb7af0548f70c3070c3f6a0b3c03ab
BLAKE2b-256 34e852138304af2bcd1f2f9b628d65e272685f92a82c7e39a47ac5ceede706b6

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