Python SDKFeature Clients

Rate Limits Client

Bases: BaseRestClient

The rate limits client is a wrapper for Hatchet's gRPC API that makes it easier to work with rate limits in Hatchet.

Methods:

NameDescription
aio_listList all rate limits for the tenant.
aio_putPut a rate limit for a given key.
listList all rate limits for the tenant.
putPut a rate limit for a given key.

Functions

aio_list

List all rate limits for the tenant.

Parameters:

NameTypeDescriptionDefault
offsetint | NoneThe number of results to skip.None
limitint | NoneThe maximum number of results to return.None
searchstr | NoneA search query to filter rate limits by key.None
order_by_fieldRateLimitOrderByField | NoneThe field to order results by.None
order_by_directionRateLimitOrderByDirection | NoneThe direction to order results.None

Returns:

TypeDescription
RateLimitListA list of rate limits.

aio_put

Put a rate limit for a given key.

Parameters:

NameTypeDescriptionDefault
keystrThe key to set the rate limit for.required
limitintThe rate limit to set.required
durationRateLimitDurationThe duration of the rate limit.SECOND

Returns:

TypeDescription
NoneNone

list

List all rate limits for the tenant.

Parameters:

NameTypeDescriptionDefault
offsetint | NoneThe number of results to skip.None
limitint | NoneThe maximum number of results to return.None
searchstr | NoneA search query to filter rate limits by key.None
order_by_fieldRateLimitOrderByField | NoneThe field to order results by.None
order_by_directionRateLimitOrderByDirection | NoneThe direction to order results.None

Returns:

TypeDescription
RateLimitListA list of rate limits.

put

Put a rate limit for a given key.

Parameters:

NameTypeDescriptionDefault
keystrThe key to set the rate limit for.required
limitintThe rate limit to set.required
durationRateLimitDurationThe duration of the rate limit.SECOND

Returns:

TypeDescription
NoneNone

Last updated on September 1, 2026

On this page