Skip to main content

Reqly

reqly

API monitoring for Python that tells you what broke, when, and which deploy did it.
FastAPI · Flask · Django · Starlette · Litestar · any WSGI/ASGI app, in one line.

PyPI version Python versions Downloads License: MIT

Documentation · Quickstart · Live demo · GitHub


Install

pip install reqly
import reqly
from fastapi import FastAPI

app = FastAPI()
reqly.instrument(app, service_name="checkout-api",
                 collector_url="https://reqly.example.com", api_key="your-ingest-key")

That's it: every route now reports its latency, errors, status codes and release to your own Reqly collector. No decorators, no agent, no vendor account.

What you get

📈 Real percentiles p50 / p95 / p99 per route and per service, merged exactly across routes and time
🚀 Deploy-aware The release is picked up from your CI or host (GITHUB_SHA, RENDER_GIT_COMMIT, …); every alert says which release was running
🔔 Alerts that explain Hourly checks against each route's weekday × hour baseline, naming the host, error type and clients behind a spike; to Slack, Discord or a webhook
💬 Ask Reqly "Why did /orders start failing?" answered from your own data, every number checked
🎯 SLOs Availability and latency objectives with error budgets and burn-rate alerts
🧾 OpenAPI drift Undocumented, unused and deprecated-but-called endpoints (push_openapi=True)
👥 API consumers Who calls your API and who an incident hit, with ids hashed in the SDK
💸 LLM cost per route Tokens and cost per route and model, and an alert when it spikes

Your framework

Framework What to write
FastAPI, Starlette, Litestar, Flask reqly.instrument(app, service_name="..."), detected automatically
Django, DRF, Django Ninja "reqly.integrations.django.ReqlyMiddleware" first in MIDDLEWARE
Bottle, Pyramid, Falcon, any WSGI app app = reqly.instrument_wsgi(app, route_resolver=...)
Any ASGI app app = reqly.instrument_asgi(app, route_resolver=...)
# settings.py (Django)
MIDDLEWARE = ["reqly.integrations.django.ReqlyMiddleware", ...]
REQLY = {"service_name": "checkout-api", "api_key": "your-ingest-key"}

# Bottle: tell Reqly where the route template is
app = reqly.instrument_wsgi(app, service_name="checkout-api",
                            route_resolver=lambda environ: environ["bottle.route"].rule)

Routes are recorded as templates (/users/{id}), never raw paths; requests no route matched become __unmatched__, so 404 scanners can't flood your data.

Who is calling, and what it costs

reqly.instrument(app, consumer_header="X-API-Key", consumer_salt=os.environ["REQLY_CONSUMER_SALT"])

completion = client.chat.completions.create(model="gpt-4o-mini", messages=messages)
reqly.record_llm_response(completion)          # OpenAI / Anthropic responses, or:
reqly.record_llm_usage("gpt-4o-mini", input_tokens=1200, output_tokens=240)

Consumer ids are HMAC-SHA256-hashed with your salt before they leave the app; the collector never sees an API key.

An alert looks like this

🔴 Anomaly — flask-demo /orders (Friday 15:00-16:00 UTC, z=5.37)
• error rate 30.0% vs 2.2% usual · p95 6588ms vs 1576ms usual
• running release v2 — vs v1: errors 2.6% → 33.1%, p95 2072ms → 4501ms
• 100% of errors came from host pod-3, which served 23% of requests

Configuration

Pass options to instrument() or set environment variables (argument → environment variable → default).

Argument Environment variable Default
service_name REQLY_SERVICE_NAME the script name
collector_url REQLY_COLLECTOR_URL http://localhost:8000
api_key REQLY_API_KEY None
release REQLY_RELEASE, then CI variables auto-detected
environment REQLY_ENVIRONMENT None
sample_rate REQLY_SAMPLE_RATE 1.0
flush_interval_seconds REQLY_FLUSH_INTERVAL_SECONDS (or _MS) 5.0; a full batch is sent at once
max_batch_size / max_queue_size REQLY_MAX_BATCH_SIZE / REQLY_MAX_QUEUE_SIZE 200 / 2000
ignore_routes REQLY_IGNORE_ROUTES /health,/metrics
consumer_header / consumer REQLY_CONSUMER_HEADER / — None
consumer_salt / hash_consumer REQLY_CONSUMER_SALT / REQLY_HASH_CONSUMER None / True
push_openapi REQLY_PUSH_OPENAPI False (FastAPI, Litestar)

Every option, explained: Python SDK docs.

Built to stay out of your way

  • ⚡ ~13 µs per request on FastAPI and Starlette, ~33 µs on Flask (benchmark)
  • 🛡️ Fail-open: an internal error is logged once and instrumentation turns itself off; it never raises into your app
  • 🧵 Off the request path: a background thread ships batches with strict timeouts, so a slow collector never blocks a request
  • 📦 Bounded: a fixed-size queue (oldest dropped first) and route templates only
  • 🔁 Safe retries on 408, 429 and 5xx, deduplicated by the collector
  • 🍴 Pre-fork servers (gunicorn --preload, uWSGI) restart the shipper in each worker

Compatibility

Python 3.9 – 3.13
FastAPI 0.100+, including app.mount()ed sub-apps
Starlette · Litestar · Flask 0.27+ · 2.0+ · 2.3+
Django 4.2+, sync and async views; DRF and Django Ninja
Collector consumer and LLM views need 0.8.0+, push_openapi 0.7.0+

Not on Python? There's a Node.js SDK, and any language can report through OpenTelemetry.

Run the collector

The SDK sends to a Reqly collector you host (TimescaleDB + collector + dashboard):

git clone https://github.com/tanisheesh/reqly && cd reqly && docker compose up -d
# or on Kubernetes
helm install reqly oci://ghcr.io/tanisheesh/charts/reqly -n reqly --create-namespace

Quickstart · Deploy to production · Changelog · License: MIT (the collector is AGPL-3.0)


Tanish Poddar

Website LinkedIn GitHub Email

Metadata

Release files for reqly 0.5.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reqly 0.5.4
File Size Uploaded
reqly-0.5.4.tar.gz 39.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for reqly 0.5.4
File Interpreter ABI Platform
reqly-0.5.4-py3-none-any.whl Python 3 none any Details

Total release size: 71.8 kB

Release files / reqly-0.5.4.tar.gz

Download URL reqly-0.5.4.tar.gz
Size 39.3 kB
Tags Source
SHA-256 checksum
How to use checksums
10d42e94dcf02e5e5d69a94ba004a7403e83f6fa55abb455776295928306526b
BLAKE2b-256 checksum
How to use checksums
9bbbd15bdbdb835e77820da91cb6247fe4841dac6bc486f748560a721eb2b84c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release files / reqly-0.5.4-py3-none-any.whl

Download URL reqly-0.5.4-py3-none-any.whl
Size 32.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5280ac1824cf7e46d2c152b8ab2f63ef9634b35dec3a064a11ae52913b344a2
BLAKE2b-256 checksum
How to use checksums
3ff5cba55664c9e7c8765516643e6bb4558d9eb08617fea96be3cbf31bffd7fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.6

2 release files

0.5.5

2 release files

This release

0.5.4 This release

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page