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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: aioopenexchangerates-0.6.9.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.9.tar.gz
Algorithm Hash digest
SHA256 696c25800dc3ac534cefd4237dd66c29b4e48ca2a915cdee6f264950c1e86641
MD5 0241863eb3739bb6e5209d4e0f1207c1
BLAKE2b-256 517a7560d89e3e513df0abc64783ee73e2e1dbeb5a6d2fce9d049fde25773ddf

See more details on using hashes here.

Provenance

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

Publisher: ci.yml on MartinHjelmare/aioopenexchangerates

Attestations:

File details

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

File metadata

File hashes

Hashes for aioopenexchangerates-0.6.9-py3-none-any.whl
Algorithm Hash digest
SHA256 bfed9235ddaaecca9866b17ea8747220bbd7ec2cb284638347e4ea24d4aad266
MD5 487576865e65eaa3ea6b1a346e6d8622
BLAKE2b-256 81953db5d2e389873105fcd129a77357225cdd5a5217f3e956a9714256715bfc

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioopenexchangerates-0.6.9-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