homematicip.connection.rate_limited_rest_connection¶
homematicip.connection.rate_limited_rest_connection
¶
RateLimitedRestConnection
¶
Bases: RestConnection
__init__
¶
Initialize the RateLimitedRestConnection with a token bucket algorithm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ConnectionContext
|
The connection context. |
required |
|
int
|
The number of tokens in the bucket. Default is 10. |
RATE_LIMITER_TOKENS
|
|
int
|
The fill rate of the bucket in tokens per second. Default is 8. |
RATE_LIMITER_FILL_RATE
|
|
AsyncClient | None
|
The httpx client session if you want to use a custom one. |
None
|