Metadata-Version: 2.4
Name: asyncio_for_ynab
Version: 1.83.0
Summary: Unofficial asyncio client for the YNAB API.
Home-page: https://github.com/mxr/asyncio-for-ynab
Author: Max R
Author-email: mxr@users.noreply.github.com
License: MIT
Keywords: ynab,budget,asyncio,openapi,httpx
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic>=2.11
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: typing-extensions>=4.7.1
Provides-Extra: dev
Requires-Dist: aioresponses; extra == "dev"
Requires-Dist: covdefaults>=2.1.0; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"

# 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

```bash
python -m pip install asyncio-for-ynab
```

For local development:

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

## Quick Start

```python
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:

```python
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:

```python
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:

```bash
pre-commit run --all-files
```

Run the test suite:

```bash
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`.
