Skip to main content

Uniform quota collection for LLM providers

Project description

ko-fi

usage-limits

Uniform quota collection for CLI- and API-backed LLM providers.

Setup

direnv allow
just setup

Local configuration lives in .envrc and inherits shared shell configuration from ~/.envrc:

source_up

# Required only for the Ollama provider.
# OLLAMA_SESSION_COOKIE=

Direct Use

uvx --from git+https://github.com/dzackgarza/usage-limits.git \
  usage-limits providers list

uvx --from git+https://github.com/dzackgarza/usage-limits.git \
  usage-limits collect --provider claude --json

uvx --from git+https://github.com/dzackgarza/usage-limits.git \
  usage-limits availability --all --json

uvx --from git+https://github.com/dzackgarza/usage-limits.git \
  usage-limits table --provider claude --provider codex

Commands

  • usage-limits providers list reports registered provider metadata.
  • usage-limits collect emits the canonical usage JSON contract.
  • usage-limits availability emits the availability-only JSON contract.
  • usage-limits table renders the same data with Rich.
  • Provider aliases such as usage-claude and usage-antigravity are thin wrappers.

JSON Contract

collect returns:

  • version
  • captured_at
  • providers

Each provider entry contains:

  • provider
  • display_name
  • status
  • rows
  • availability
  • metadata
  • errors

availability returns the same top-level framing with provider availability entries only.

Side Effects

Collection is read-only by default. Notifications and anchoring are explicit:

usage-limits table --provider claude --notify --anchor
usage-limits collect --provider codex --json --notify --anchor

Provider Coverage

First-party providers currently include:

  • amp
  • antigravity
  • claude
  • codex
  • ollama
  • openrouter
  • qwen

openrouter currently returns a normalized error snapshot because request counting is not implemented.

Development

  • just setup installs the project and dev dependencies.
  • just check runs lint, tests, and typecheck.
  • just build builds a wheel and sdist.
  • just bump increments the minor version with uv version --bump minor.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

usage_limits-1.0.2.tar.gz (56.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

usage_limits-1.0.2-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file usage_limits-1.0.2.tar.gz.

File metadata

  • Download URL: usage_limits-1.0.2.tar.gz
  • Upload date:
  • Size: 56.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for usage_limits-1.0.2.tar.gz
Algorithm Hash digest
SHA256 474e9b56e29a98fc1a2d80b8db91a2742d416ba1caa73c09590a43bca5c2d97c
MD5 72ca0a140278f672a3cdb21276afb315
BLAKE2b-256 ee7e6b7bb9ba9ef02f10a16692a2411b825cca873d4d4589815ef4754ba15015

See more details on using hashes here.

File details

Details for the file usage_limits-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: usage_limits-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for usage_limits-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e014643ded75c1089edf55b412a4803cc9b324dd736d6d553693eda3f0be3aaa
MD5 013fe59adb6d5ab5c1af114ed5fac5c0
BLAKE2b-256 92d27be5bffcdc666b570c7effc7644296737a93883ac1bd08484fbb02ca134e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page