Real-time observability for Python

See every request, error & log from your Python backend

Add 3 lines of code. Get instant visibility into every HTTP request, exception, and custom log — all in a real-time dashboard you'll actually enjoy using.

3 lines
To integrate
<0.1ms
Per request
100%
Open source
Request rate
Live
1,284/min
Live request log
GET
/api/users/4220012ms
POST
/api/orders20138ms
GET
/api/products2008ms
DELETE
/api/sessions/9500142ms
POST
/api/auth/login20024ms
Works with
Python
FastAPI
Django
Flask
Features

Everything captured, nothing missed

The SDK automatically captures requests and exceptions. You focus on shipping — we handle the observability.

Automatic request logging

Every HTTP request captured — method, path, status, duration, headers. No manual instrumentation.

Exception tracking

Exceptions caught with full stack traces, grouped by type, tracked over time. Know what broke and when.

Custom log messages

Add context with ledger.log_info() and ledger.log_error(). Attach attributes like user IDs or order amounts.

Performance insights

Identify slow endpoints with response time tracking. See which routes are bottlenecks and need optimization.

Powerful filtering

Filter logs by level, endpoint, time range, or custom attributes. Find the needle in seconds.

Per-project API keys

Separate API keys for each project or environment. Revoke access instantly without affecting others.

How it works

Start monitoring in under 5 minutes

No complex setup. No infrastructure to manage. Install, configure, and go.

1

Install the SDK

One command. Supports Python 3.10+.

pip install ledger-sdk
2

Add the middleware

Drop in our middleware for FastAPI, Django, or Flask.

from ledger import LedgerClient
from ledger.integrations.fastapi import LedgerMiddleware

ledger = LedgerClient(api_key="your_key")
app.add_middleware(LedgerMiddleware, ledger_client=ledger)
3

See your logs

Every request, response, and exception appears in your dashboard instantly.

From your code to your dashboard

Three lines. Real visibility.

You write the highlighted lines. Ledger turns every request into a live stream of structured data.

main.py
from fastapi import FastAPI
from ledger import LedgerClient

from ledger.integrations.fastapi import LedgerMiddleware

app = FastAPI()
ledger = LedgerClient(api_key="your_key")

app.add_middleware(LedgerMiddleware, ledger_client=ledger)

@app.get("/users/{id}")
def get_user(id: int):
    return {"id": id}
Throughput
24.1k/h
Errors
12/h
Recent requests
GET
/api/users/42200
POST
/api/orders201
GET
/api/products200
DELETE
/api/sessions/9500
POST
/api/auth/login200

Stop guessing what your backend is doing

Create a free account, grab your API key, and see your first logs in under 5 minutes.

No credit card required