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"])

client = reqly.instrument_openai(OpenAI())    # every call counted (instrument_anthropic too), or:
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; True on FastAPI/Litestar, or the spec (dict or function) on any app

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
  • ⏱️ Bounded exit: queued events are sent on shutdown in at most 5 s, so a collector outage never holds up a deploy
  • 🍴 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.7.1

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.7.1
File Size Uploaded Provenance Actions
reqly-0.7.1.tar.gz 50.9 kB With provenance Details for reqly-0.7.1.tar.gz

Built distribution (wheel)

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

Total release size: 90.2 kB

Release files / reqly-0.7.1.tar.gz

Download URL reqly-0.7.1.tar.gz
Size 50.9 kB
Tags Source
SHA-256 checksum
How to use checksums
26f197eca431471a05172da69968cebb3dd446f6c7e48e68b678c6e0b6669dd5
BLAKE2b-256 checksum
How to use checksums
3bec8af36bf55df2358e9b8e18596a91c6feb125fce2767899f1804c2e96be2c
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 19, 2026.

Transparency log

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

Download URL reqly-0.7.1-py3-none-any.whl
Size 39.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
625c0229aa29b7196cb233ca6d1099b02dc4f389c54cfb77f0314f3a2bf8610e
BLAKE2b-256 checksum
How to use checksums
fd70b57876b1cbd237dfa9d642070ad99358b2127d711e77c31e53165305ede4
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 19, 2026.

Transparency log

Security for reqly 0.7.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for reqly-0.7.1.tar.gz

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 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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