Skip to content

homematicip.connection.rate_limited_rest_connection

RateLimitedRestConnection

Bases: RestConnection

__init__

__init__

Initialize the RateLimitedRestConnection with a token bucket algorithm.

Parameters:

Name Type Description Default

context

ConnectionContext

The connection context.

required

tokens

int

The number of tokens in the bucket. Default is 10.

RATE_LIMITER_TOKENS

fill_rate

int

The fill rate of the bucket in tokens per second. Default is 8.

RATE_LIMITER_FILL_RATE

httpx_client_session

AsyncClient | None

The httpx client session if you want to use a custom one.

None

async_post async

async_post

Post data to the HomematicIP Cloud API.