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.84.0.tar.gz (103.5 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.84.0-py2.py3-none-any.whl (391.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: asyncio_for_ynab-1.84.0.tar.gz
  • Upload date:
  • Size: 103.5 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.84.0.tar.gz
Algorithm Hash digest
SHA256 9831e269ed71a339240356907fadc14d68be731f6e8c3600cf6d82ee3fe02ced
MD5 689d7964841a5cc3566d331e42ae747d
BLAKE2b-256 4afe8783817f168e7edc4e2fe05aca62138ea3035651b70a3bc7c44108afad86

See more details on using hashes here.

Provenance

The following attestation bundles were made for asyncio_for_ynab-1.84.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.84.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for asyncio_for_ynab-1.84.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2b7be474f9415d7afce46f3051eb6f254be5e5f4a6c77513fd2317883fdcaa37
MD5 ebed9c4d21e8eb75e0b55e740061f838
BLAKE2b-256 dcea9285a45ed795ab694f1aa83e2cbb71addef504aa71fbb3fc97af7fe55647

See more details on using hashes here.

Provenance

The following attestation bundles were made for asyncio_for_ynab-1.84.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