YNAB API Python Library

This is the Python client for the YNAB API.
Please read the YNAB API documentation for an
overview of using the API and a complete list of available resources.
This client is generated using the OpenAPI Generator.
Requirements
Python 3.8+
Installation
First, install the package using pip:
pip install ynab
Then import the package:
import ynab
Usage
To use this client, you must
obtain an access token from
the Account Settings area of the YNAB web
application.
import ynab
configuration = ynab.Configuration(
access_token = "b43439eaafe2_this_is_fake_b43439eaafe2"
)
with ynab.ApiClient(configuration) as api_client:
budgets_api = ynab.BudgetsApi(api_client)
budgets_response = budgets_api.get_budgets()
budgets = budgets_response.data.budgets
for budget in budgets:
print(budget.name)
Methods
Versioning
The version of this client is defined in the pyproject.toml
file and follows semantic versioning. The version of this client is maintained independently and does not align with the the version of YNAB API itself (which is defined in the OpenAPI spec). To determine which spec version of the YNAB API was used when generating this client you can refer to the "description" field in the pyproject.toml
file.
License
Copyright (c) 2025 You Need A Budget, LLC
Licensed under the Apache-2.0 license