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
Close
Hashes for aioopenexchangerates-0.4.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68dc1b81954ab05a5522e15e5bdebdb90383430ad9fe221bff3d44313da23ea4 |
|
MD5 | 5f0923ba7b49f15807582671ac3242b8 |
|
BLAKE2b-256 | 3a4e686122c52ace62cc77a1c77d96a5a0a4cb8cafa69940fc57be4e37cefb9e |
Close
Hashes for aioopenexchangerates-0.4.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7dafb61bab3cd18ecbae6069c9efa7c8867c7a523affa1a329679825bd8a92a |
|
MD5 | acb9f7a82ca9b0e378c07727130fa04f |
|
BLAKE2b-256 | 8e8e010e0c3086b9a098fc0df499c742aea6d3c76dfedbc6342a99ab23f27414 |