valo_api.exceptions package

Submodules

valo_api.exceptions.rate_limit module

Classes:

RateLimit()

Functions:

rate_limit()

Returns the current rate limit for the API.

set_rate_limit(headers)

class RateLimit

Bases: object

Attributes:

limit

The number of requests you did in the current period.

remaining

The number of requests you can make in the current period.

reset_unix

The Unix timestamp of when the current period will reset.

reset

The time until the current period ends.

limit: int = -1

The number of requests you did in the current period.

remaining: int = -1

The number of requests you can make in the current period.

reset_unix: int = -1

The Unix timestamp of when the current period will reset.

property reset: int

The time until the current period ends.

rate_limit()

Returns the current rate limit for the API.

Returns:

A RateLimit object.

Return type:

RateLimit

set_rate_limit(headers)

valo_api.exceptions.valo_api_exception module

Exceptions:

ValoAPIException(response)

Base exception for all exceptions in the Valo API.

exception ValoAPIException(response)

Bases: Exception

Base exception for all exceptions in the Valo API.

Attributes:

ratelimit

status

Return the status code of the response.

message

Return the error message of the response.

detail

Return the error message of the response.

errors

Return the error code of the response.

ratelimit: RateLimit
property status: int | None

Return the status code of the response.

Returns:

The status code of the response.

property message: str | None

Return the error message of the response.

Returns:

The error message of the response.

property detail: str | None

Return the error message of the response.

Returns:

The error message of the response.

property errors: List[Error] | None

Return the error code of the response.

Returns:

The error code of the response.

Module contents