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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: aioopenexchangerates-0.6.20.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for aioopenexchangerates-0.6.20.tar.gz
Algorithm Hash digest
SHA256 502d2feff42c1e15fd69504ca25f8ce0eda67fa803f7fa31b56cf3b2078e6874
MD5 df69ad46603682b03c65f3d5288f2e72
BLAKE2b-256 cccd1ae01420a9ad7210c034bb99952bcc9e3796d9a87bf70ab76f04a5690841

See more details on using hashes here.

Provenance

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

Publisher: ci.yml on MartinHjelmare/aioopenexchangerates

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for aioopenexchangerates-0.6.20-py3-none-any.whl
Algorithm Hash digest
SHA256 734813535b60e0a19cd261b946fa5fb11c19b77ebbfc2fef13a8bf80f141800d
MD5 df9597a33024866ad971836078711b1a
BLAKE2b-256 0ee75437c2b71630d035f97874486a597496c2b94915506dec171c6cdbcbf6f8

See more details on using hashes here.

Provenance

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

Publisher: ci.yml on MartinHjelmare/aioopenexchangerates

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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