Skip to main content

GRatekeeper

GRatekeeper (“GitHub Ratekeeper”) is a lightweight companion for monitoring and controlling GitHub API usage. It gives you:

  • A lean, configurable dashboard (gk-dash / gratekeeper-dashboard) that shows every quota bucket, Actions activity, and billing minutes, with quick toggles and themes.
  • A drop-in requests.Session wrapper (RateLimitedGitHubClient) that enforces a soft floor before you hit zero, plus optional killswitches for runaway jobs.

Why it’s different from simple retries/backoff:

  • Adaptive throttling before zero: While other libraries offer automatic retries and backoff, Gratekeeper slows down your requests before you hit the limit, making it safe to aggressively script your application's API calls without worrying about crossing over into the dreaded secondary rate limit, possibly encurring penalties or prolonged cooldown periods.
  • Multi-process friendly: The dashboard/socket lets multiple scripts share live bucket state so one noisy job doesn’t blind the others.
  • Last-resort brakes: A killswitch can stop all new requests during incidents, avoiding secondary rate limits.

Quick start

Install (Python 3.10+):

pip install gratekeeper

Use the client:

from gratekeeper import RateLimitedGitHubClient

client = RateLimitedGitHubClient()  # picks up $GITHUB_TOKEN
me = client.get_json("/user")
print(me["login"])

Run the dashboard:

gk-dash --refresh 10 --fetch 30 --actions my-org/my-repo
# prefer a simpler table? add --ui table

Common tasks:

  • Customize HTTP: pass token, base_url, user_agent, or bucket="search" to isolate quotas.
  • Disable throttling temporarily: enable_ratekeeping=False on the client.
  • Themes/presets/bucket toggles/Actions on/off are built into the Textual UI; see the dashboard guide below.

Security and compatibility

  • The socket bridge is local-only but unauthenticated; change the path or disable with --socket none / GRATEKEEPER_SOCKET=none on shared hosts. On Windows, the bridge is disabled automatically.
  • Works with REST and GraphQL; buckets stay separate unless you intentionally merge them via bucket=....

Where to go next

Release files for gratekeeper 0.7.0

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

Source distribution (sdist)

Source distribution for gratekeeper 0.7.0
File Size Uploaded
gratekeeper-0.7.0.tar.gz 42.1 kB Details

Built distribution (wheel)

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

Total release size: 70.1 kB

Release files / gratekeeper-0.7.0.tar.gz

Download URL gratekeeper-0.7.0.tar.gz
Size 42.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ee5e5e388b0e7b2ef6e7918708c0064ed7c485bbcdb49808bf6832ccf46b7d2a
BLAKE2b-256 checksum
How to use checksums
e245afa85bb9b8bd456e87d86b68690008e7300c0088c0a0ba2ad72941aba1e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 20, 2025.

Transparency log

Release files / gratekeeper-0.7.0-py3-none-any.whl

Download URL gratekeeper-0.7.0-py3-none-any.whl
Size 28.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10a201efcb32f900104cbb81990f41c1a1c580cdc2b67dc01685364dbab6c89f
BLAKE2b-256 checksum
How to use checksums
0c202408b36de11c4db7a4c14f4ab4347bbaba91a1189b5bebef3db1433301e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 20, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.0 This release

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