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.3.9.tar.gz (32.0 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.3.9-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: heaven-1.3.9.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/6.14.0-37-generic

File hashes

Hashes for heaven-1.3.9.tar.gz
Algorithm Hash digest
SHA256 3702fce600700b621e377890313e2471e7e1fa4d955caf82834a65b8dc1a4812
MD5 7919c1963607817d04e7804e21217883
BLAKE2b-256 d05cbe7d0d3164591b779dd58e6194b8e3a82b2d1f26cfb94c3e85469674c0f3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for heaven-1.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 75722a208cc4d2e6881e7dac1c82ee87531dfeadadabcbe8a1a12d954df8af9a
MD5 b575da69c2bddd07ae9b5a01046aa2a9
BLAKE2b-256 e4973fdc54be91b2183744f614ccfa2e912b9bed237f32df6c54f9b066272bdf

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