Skip to main content

Unofficial asyncio client for the YNAB API.

Project description

asyncio-for-ynab

Asyncio client for the YNAB API.

This package is generated from the YNAB OpenAPI spec and uses the OpenAPI Generator Python httpx client.

This project is not affiliated with, endorsed by, or officially connected with YNAB.

Install

python -m pip install asyncio-for-ynab

For local development:

python -m pip install -e ".[dev]"

Quick Start

import asyncio

from asyncio_for_ynab import ApiClient
from asyncio_for_ynab import Configuration
from asyncio_for_ynab import PlansApi
from asyncio_for_ynab import UserApi


async def main() -> None:
    configuration = Configuration(access_token="your-access-token")

    async with ApiClient(configuration) as api_client:
        user_api = UserApi(api_client)
        plans_api = PlansApi(api_client)

        user = await user_api.get_user()
        plans = await plans_api.get_plans()

    print(user)
    print(plans)


asyncio.run(main())

Common Patterns

Create a client once and pass it to any generated API class:

from asyncio_for_ynab import AccountsApi
from asyncio_for_ynab import ApiClient
from asyncio_for_ynab import Configuration


configuration = Configuration(access_token="your-access-token")

async with ApiClient(configuration) as api_client:
    accounts_api = AccountsApi(api_client)
    accounts = await accounts_api.get_accounts()

The package also exports generated models, response objects, and exceptions at the top level:

from asyncio_for_ynab import AccountResponse
from asyncio_for_ynab import ApiException
from asyncio_for_ynab import TransactionResponse

Development

Run the repository checks with pre-commit:

pre-commit run --all-files

Run the test suite:

tox -e py

Release Notes

Package versions mirror the YNAB API spec version.

For example, spec 1.83.0 is published as asyncio-for-ynab==1.83.0.

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

asyncio_for_ynab-1.85.0.tar.gz (103.7 kB view details)

Uploaded Source

Built Distribution

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

asyncio_for_ynab-1.85.0-py2.py3-none-any.whl (392.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file asyncio_for_ynab-1.85.0.tar.gz.

File metadata

  • Download URL: asyncio_for_ynab-1.85.0.tar.gz
  • Upload date:
  • Size: 103.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for asyncio_for_ynab-1.85.0.tar.gz
Algorithm Hash digest
SHA256 1dbb1eb03296a13433850dcbb9fa567ec91b7d9f23b5606451691a0d439cc69f
MD5 67115be780786e7aed8430f900bb4dd1
BLAKE2b-256 98e82a8cadfdaf641d9262417b742c191736b3705513567660b7181bc6576e24

See more details on using hashes here.

Provenance

The following attestation bundles were made for asyncio_for_ynab-1.85.0.tar.gz:

Publisher: release.yml on mxr/asyncio-for-ynab

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

File details

Details for the file asyncio_for_ynab-1.85.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for asyncio_for_ynab-1.85.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 38f372f07fdb863b1aae4567ed627ba80337132f85fb4eaa82148960b23ad95c
MD5 39cfd811ea9a4132c24ea2497dfee88f
BLAKE2b-256 a5b47cdd05781815286244f5c3ad87ddfd6c7cdd179f08c12c83ea7fd7a7f18c

See more details on using hashes here.

Provenance

The following attestation bundles were made for asyncio_for_ynab-1.85.0-py2.py3-none-any.whl:

Publisher: release.yml on mxr/asyncio-for-ynab

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