RateLimitStatus

class gafaelfawr.models.userinfo.RateLimitStatus(limit, remaining, reset, resource)

Bases: object

Current status of rate limiting for a user for one API.

This is an internal model used to hold rate limiting status information that will be returned to the user in HTTP headers. It represents a fixed window rate limit algorithm.

Parameters:

Methods Summary

to_http_headers()

Return the rate limit status as HTTP headers.

Methods Documentation

to_http_headers()

Return the rate limit status as HTTP headers.

The headers were chosen to match the GitHub rate limit implementation.

Return type:

dict[str, str]