Skip to main content

No project description provided

Project description

Dapil 🏎️💨

Dapil is an ultra-high-performance Python web framework powered by Rust and the Axum networking stack. It is designed to bridge the gap between Python's developer productivity and Rust's world-class performance.

By using a specialized "Single Actor" GIL Model, Dapil achieves throughput that redefines what is possible for Python web services.

🚀 Performance at a Glance

Dapil isn't just "fast"—it's record-breaking. In basic benchmarks, it outperforms common frameworks by massive margins:

Framework Requests/Sec Lead vs FastAPI
Dapil (Extreme) 29,661 8.3x faster
Django-Bolt (Rust) 19,511 5.5x faster
Django (Gunicorn) 5,623 1.6x faster
FastAPI (Uvicorn) 3,563 1.0x (Baseline)

✨ Key Features

  • Blazing Speed: Powered by Rust and Axum, reaching nearly 30,000 requests per second on a single worker.
  • Zero-Contention GIL Model: Uses a dedicated single-actor thread for Python execution to eliminate lock contention.
  • Automatic Observability: Seamlessly bridges Rust tracing logs to Python's standard logging module.
  • Modern DX: Simple, decorator-based API inspired by FastAPI.

📦 Quickstart

Installation

Currently, Dapil is in early development. You can build it from source:

pip install maturin
maturin develop --release

Basic App

import dapil

app = dapil.App()

@app.get("/")
def hello():
    return "Hello from Dapil!"

if __name__ == "__main__":
    app.serve()

🧠 The "Single Actor" Secret

Most Python/Rust bridges suffer from GIL (Global Interpreter Lock) contention when scaling across threads. Dapil solves this by:

  1. Handling all network I/O in Rust's multi-threaded Tokio runtime.
  2. Funneling Python execution into a single dedicated worker thread.
  3. Passing tasks via high-performance lock-free channels.

This architecture ensures the Python interpreter spends zero time fighting for locks, allowing it to execute at 100% efficiency.

📖 Documentation

The documentation is built with MkDocs using the Material theme for a premium, FastAPI-style experience.

Running the Documentation Locally

To preview the documentation site locally:

pip install mkdocs-material
mkdocs serve

Then visit http://127.0.0.1:8000 in your browser.

License

MIT

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

dapil-0.1.1.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

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

dapil-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl (504.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

File details

Details for the file dapil-0.1.1.tar.gz.

File metadata

  • Download URL: dapil-0.1.1.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.8

File hashes

Hashes for dapil-0.1.1.tar.gz
Algorithm Hash digest
SHA256 09758cd7ac2531865dc2132163058560654d23ff04bab8fbecedadce08314617
MD5 28f17a414f9fdf839de443a14fd2b3e2
BLAKE2b-256 46a91ac59a49ef40ee262158dc2954d97776c5cb1f8ff887fc66ba4efe30c052

See more details on using hashes here.

File details

Details for the file dapil-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for dapil-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ad64adeb1ad919bf4676cee9c001aa422c45b94437c7c281ecbd8024c398533b
MD5 c5f89d84de18f3583b5ad0fbd893c47a
BLAKE2b-256 2de0bd80deb3d10cc303f22b574a7789c83cd47383f2f64eba5c7280c02c41db

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