aioopenexchangerates package¶
Fetch rates from openexchangerates with aiohttp.
- class aioopenexchangerates.Client(api_key: str, session: ClientSession | None = None)[source]¶
Bases:
objectRepresent the client for the Open Exchange Rates API.
- async get_currencies(show_alternative: bool = False, show_inactive: bool = False) dict[str, str][source]¶
Get the supported currencies.
- class aioopenexchangerates.Latest(disclaimer: str, license: str, timestamp: int, base: str, rates: dict[str, float])[source]¶
Bases:
BaseRatesResponseRepresent the model for endpoint latest.json.
- classmethod from_dict(d, *, dialect=None)¶
- to_dict()¶
- exception aioopenexchangerates.OpenExchangeRatesAuthError[source]¶
Bases:
OpenExchangeRatesClientErrorRepresent an authentication error.
- exception aioopenexchangerates.OpenExchangeRatesClientError[source]¶
Bases:
OpenExchangeRatesErrorRepresent a client error.
- exception aioopenexchangerates.OpenExchangeRatesError[source]¶
Bases:
ExceptionRepresent an error for the Open Exchange Rates API.
Subpackages¶
Submodules¶
aioopenexchangerates.client module¶
Provide a client for the Open Exchange Rates API.
- class aioopenexchangerates.client.Client(api_key: str, session: ClientSession | None = None)[source]¶
Bases:
objectRepresent the client for the Open Exchange Rates API.
- async get_currencies(show_alternative: bool = False, show_inactive: bool = False) dict[str, str][source]¶
Get the supported currencies.
aioopenexchangerates.exceptions module¶
Provide exceptions for the Open Exchange Rates API.
- exception aioopenexchangerates.exceptions.OpenExchangeRatesAuthError[source]¶
Bases:
OpenExchangeRatesClientErrorRepresent an authentication error.
- exception aioopenexchangerates.exceptions.OpenExchangeRatesClientError[source]¶
Bases:
OpenExchangeRatesErrorRepresent a client error.
- exception aioopenexchangerates.exceptions.OpenExchangeRatesError[source]¶
Bases:
ExceptionRepresent an error for the Open Exchange Rates API.
- exception aioopenexchangerates.exceptions.OpenExchangeRatesRateLimitError[source]¶
Bases:
OpenExchangeRatesClientErrorRepresent a rate limit error.