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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: aioopenexchangerates-0.6.12.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.12.tar.gz
Algorithm Hash digest
SHA256 a537dd67c2db21c6a1092d209f42c61a536d1bd42f180071b1c265effed31296
MD5 c385e5377c38dffb0fe2848d0785702a
BLAKE2b-256 1648500ddd9be1cd4bd721440bcd1e2f2f3909677de05b5b92d22e5905038133

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioopenexchangerates-0.6.12.tar.gz:

Publisher: ci.yml on MartinHjelmare/aioopenexchangerates

Attestations:

File details

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

File metadata

File hashes

Hashes for aioopenexchangerates-0.6.12-py3-none-any.whl
Algorithm Hash digest
SHA256 c8d2ea15b8cc9da6be9173a402bde931e08f788332b43d66bb81092ef362456f
MD5 cf1e06684b1d2f945cb359fa8ea35084
BLAKE2b-256 84b1351fd90a90fbecf85474a498b97e46c87a9d780d9a1c793003a5969a7a99

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioopenexchangerates-0.6.12-py3-none-any.whl:

Publisher: ci.yml on MartinHjelmare/aioopenexchangerates

Attestations:

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