Fetch rates from openexchangerates with aiohttp.
Project description
aioopenexchangerates
Fetch rates from openexchangerates with aiohttp.
Installation
Install this via pip (or your favourite package manager):
pip install aioopenexchangerates
Usage
import asyncio
from aioopenexchangerates import Client, OpenExchangeRatesError
async def main() -> None:
"""Run main."""
async with Client("your_api_key") as client:
try:
result = await client.get_latest()
except OpenExchangeRatesError as err:
print(err)
else:
print(result)
if __name__ == "__main__":
asyncio.run(main())
Credits
This package was created with Cookiecutter and the browniebroke/cookiecutter-pypackage project template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aioopenexchangerates-0.4.8.tar.gz
.
File metadata
- Download URL: aioopenexchangerates-0.4.8.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49e526c5565d5297c96a7abe5e286466aad06b8ebc03b80d6839f0e71f3cc6dc |
|
MD5 | f2b1813503c80d369374e4043a1c0313 |
|
BLAKE2b-256 | 10452795310e52d921e44dc549da247794029ff018e525818c43d0a6503c8367 |
File details
Details for the file aioopenexchangerates-0.4.8-py3-none-any.whl
.
File metadata
- Download URL: aioopenexchangerates-0.4.8-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 512cdca2a5eb70403842cad549c64633baa692f21f647c5c713233359a5639b4 |
|
MD5 | c8cfed319495b39cc5692e0c6de35cad |
|
BLAKE2b-256 | c0a92f16e89c890b52c945931afcaaee89712b297d5afb1f50fab8a98ca9b7f5 |