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
aioopenexchangerates-0.3.0.tar.gz
(10.3 kB
view hashes)
Built Distribution
Close
Hashes for aioopenexchangerates-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76c11d33b486cbf7a8dae80773ceff00dde71360d9fd2d2e2f75e247d94c7863 |
|
MD5 | e5cabb45c937e479a1cbeca8165b3be2 |
|
BLAKE2b-256 | 9591aae78f626e19bd726ffc3270095fc4a3716d015d00c378309e510bc9e1c9 |
Close
Hashes for aioopenexchangerates-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6cce7d45cca704996280e1408e6b6a76e24461dd33684ea5c3d6dc023e968c5 |
|
MD5 | 6ceca21ab472cb0b904736b1369844a9 |
|
BLAKE2b-256 | 7f1b5527059522cf1f8feaef3292c64b3fded3de9c3d32ac18484995cf45424d |