Skip to main content

Fetch rates from openexchangerates with aiohttp.

Project description

aioopenexchangerates

CI Status Documentation Status Test coverage percentage

Poetry Ruff pre-commit

PyPI Version Supported Python versions License


Documentation: https://aioopenexchangerates.readthedocs.io

Source Code: https://github.com/MartinHjelmare/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 Copier and the browniebroke/pypackage-template project template.

Project details


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.6.6.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

aioopenexchangerates-0.6.6-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file aioopenexchangerates-0.6.6.tar.gz.

File metadata

  • Download URL: aioopenexchangerates-0.6.6.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for aioopenexchangerates-0.6.6.tar.gz
Algorithm Hash digest
SHA256 b5cbc6003246c86674eed738591b87508da0ecf5be022a1ab0c9ffbf0a2d2419
MD5 fa7d036a3ed7c9b37ccc44fc1ea40c3b
BLAKE2b-256 8a608a45d27b7639257c3fd83454ea04a25ad412d1745664b0778984b4cba284

See more details on using hashes here.

File details

Details for the file aioopenexchangerates-0.6.6-py3-none-any.whl.

File metadata

File hashes

Hashes for aioopenexchangerates-0.6.6-py3-none-any.whl
Algorithm Hash digest
SHA256 29657ef8710a710fd558ec16e83332f5e98781ec6a644e106cd4ec98cd9e9434
MD5 d4b7510edc64805674d8ee989c32751d
BLAKE2b-256 4cb219996d22fe2b040cd9fb9a47c6c3f38b2a93c1e6476f6fd662da5cee70e4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page