quotawatch
Python SDK for QuotaWatch — passive API usage monitoring.
Never get surprised by a rate limit again.
Installation
pip install quotawatch
Quick start
from quotawatch import QuotaWatch
from quotawatch.types import QuotaWatchConfig, ApiConfig, ApiLimits
QuotaWatch.init(QuotaWatchConfig(
api_key="qw_live_your_key_here",
ingest_url="https://ingest.quotawatch.app", # or http://localhost:3001 for local dev
environment="production",
apis=[
ApiConfig(
name="OpenAI",
base_url="https://api.openai.com",
limits=ApiLimits(
requests_per_minute=60,
requests_per_day=10_000,
tokens_per_day=1_000_000,
),
),
],
))
# That's it. Your existing requests/httpx calls are now monitored automatically.
# No record() calls needed — the SDK patches the HTTP clients on init().
import requests
response = requests.get("https://api.openai.com/v1/models", headers={...})
How it works
On init(), the SDK monkey-patches requests.Session.send and httpx.Client.send (both sync and async). Every outgoing HTTP call matching a configured base_url is recorded asynchronously — fire-and-forget. A background daemon thread flushes buffered events to the ingest API every 5 seconds.
You never call record() manually — the interceptors handle everything.
Supported HTTP clients
| Client | Supported |
|---|---|
requests |
✅ Auto-patched on init |
httpx (sync) |
✅ Auto-patched on init |
httpx (async) |
✅ Auto-patched on init |
aiohttp |
🔜 v1.1 |
urllib |
❌ Not supported |
Requirements
- Python 3.9+
- Optional:
requests,httpx(patches whichever is installed)
Documentation
Full docs at quotawatch.app/docs/python
License
MIT
Metadata
Release files for quotawatch 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quotawatch-0.0.1.tar.gz | 4.0 kB | Without provenance | Details for quotawatch-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quotawatch-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for quotawatch-0.0.1-py3-none-any.whl |
Total release size: 10.4 kB
Release files / quotawatch-0.0.1.tar.gz
| Download URL | quotawatch-0.0.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee4787e1cf04f3acaea0c91d2c6181edfc9041c15720b520506553e90ec363a2
|
|
BLAKE2b-256 checksum How to use checksums |
45a94fbd754da25991aa8b689d74f913e5902c904713101373a11052409a4973
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / quotawatch-0.0.1-py3-none-any.whl
| Download URL | quotawatch-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae491a8346317824c6d8b34e6a563bce6747f37b04656e8bbc0882d9472b9daf
|
|
BLAKE2b-256 checksum How to use checksums |
9097cc404b2e13a6fa303b95a6b7f9933658d1959acedb48da324d75c8c7ae31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for quotawatch 0.0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.