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.0.tar.gz (33.1 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.0-py3-none-any.whl (37.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: heaven-1.4.0.tar.gz
  • Upload date:
  • Size: 33.1 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.0.tar.gz
Algorithm Hash digest
SHA256 908d2ea612bde3496ecfad7bf05889ce28fedeb42610264a653bfe39dafe10e1
MD5 2d15d401c9d899391f1bd373e9a8258b
BLAKE2b-256 025a48abca4aa2ee8435427a209a0b906bf0b31bf31dae061a40b0e0702ca8f6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: heaven-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 37.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12ea1eda2d019cfb3ac8bc5d478c8576cc2c1729f959ac24a254c432e00b2e93
MD5 ed210aed5577efa802d5198cfe286ffd
BLAKE2b-256 3938d0636565add3d06b3dbc6fcd5bb1266f3d57184ed32bb6d436e5f25e7240

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