Quickstart

Serve your first ASGI application with Pounce

1 min read 200 words

Create an ASGI App

Create a file calledapp.py:

async def app(scope, receive, send):
    """Minimal ASGI application."""
    assert scope["type"] == "http"

    await send({
        "type": "http.response.start",
        "status": 200,
        "headers": [
            [b"content-type", b"text/plain"],
        ],
    })
    await send({
        "type": "http.response.body",
        "body": b"Hello from Pounce!",
    })

Serve It

pounce app:app
import pounce

pounce.run("app:app")

Openhttp://127.0.0.1:8000in your browser. You should see "Hello from Pounce!".

Enable Development Reload

pounce app:app --reload

Pounce watches your source files and restarts workers automatically when changes are detected.

Configure Workers

# Auto-detect worker count (based on CPU cores)
pounce app:app --workers 0

# Explicit 4 workers
pounce app:app --workers 4

Note

--workers 0auto-detects based on CPU cores. The default is 1 (single worker). On free-threaded Python 3.14t, workers run as threads sharing one interpreter. With the GIL enabled, workers run as separate processes.

Next Steps