# YNAB API Python Library
[](https://github.com/ynab/ynab-sdk-ruby/actions/workflows/build-test.yml)
This is the Python client for the YNAB API.
Please read the [YNAB API documentation](https://api.ynab.com) for an
overview of using the API and a complete list of available resources.
This client is generated using the [OpenAPI Generator](https://openapi-generator.tech/).
## Requirements
Python 3.8+
## Installation
First, install the package using pip:
```sh
pip install ynab
```
Then import the package:
```python
import ynab
```
## Usage
To use this client, you must
[obtain an access token](https://api.ynab.com/#authentication-overview) from
the [Account Settings](https://app.ynab.com/settings) area of the YNAB web
application.
```python
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
Class | Method | Description
------------ | ------------- | -------------
**UserApi** | [**get_user**](docs/UserApi.md#get_user) | User info
**AccountsApi** | [**create_account**](docs/AccountsApi.md#create_account) | Create a new account
| [**get_account_by_id**](docs/AccountsApi.md#get_account_by_id) | Single account
| [**get_accounts**](docs/AccountsApi.md#get_accounts) | Account list
**BudgetsApi** | [**get_budget_by_id**](docs/BudgetsApi.md#get_budget_by_id) | Single budget
| [**get_budget_settings_by_id**](docs/BudgetsApi.md#get_budget_settings_by_id) | Budget Settings
| [**get_budgets**](docs/BudgetsApi.md#get_budgets) | List budgets
**CategoriesApi** | [**get_categories**](docs/CategoriesApi.md#get_categories) | List categories
| [**get_category_by_id**](docs/CategoriesApi.md#get_category_by_id) | Single category
| [**get_month_category_by_id**](docs/CategoriesApi.md#get_month_category_by_id) | Single category for a specific budget month
| [**update_category**](docs/CategoriesApi.md#update_category) | Update a category
| [**update_month_category**](docs/CategoriesApi.md#update_month_category) | Update a category for a specific month
**MonthsApi** | [**get_budget_month**](docs/MonthsApi.md#get_budget_month) | Single budget month
| [**get_budget_months**](docs/MonthsApi.md#get_budget_months) | List budget months
**PayeeLocationsApi** | [**get_payee_location_by_id**](docs/PayeeLocationsApi.md#get_payee_location_by_id) | Single payee location
| [**get_payee_locations**](docs/PayeeLocationsApi.md#get_payee_locations) | List payee locations
| [**get_payee_locations_by_payee**](docs/PayeeLocationsApi.md#get_payee_locations_by_payee) | List locations for a payee
**PayeesApi** | [**get_payee_by_id**](docs/PayeesApi.md#get_payee_by_id) | Single payee
| [**get_payees**](docs/PayeesApi.md#get_payees) | List payees
| [**update_payee**](docs/PayeesApi.md#update_payee) | Update a payee
**ScheduledTransactionsApi** | [**create_scheduled_transaction**](docs/ScheduledTransactionsApi.md#create_scheduled_transaction) | Create a single scheduled transaction
| [**get_scheduled_transaction_by_id**](docs/ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | Single scheduled transaction
| [**get_scheduled_transactions**](docs/ScheduledTransactionsApi.md#get_scheduled_transactions) | List scheduled transactions
**TransactionsApi** | [**create_transaction**](docs/TransactionsApi.md#create_transaction) | Create a single transaction or multiple transactions
| [**delete_transaction**](docs/TransactionsApi.md#delete_transaction) | Deletes an existing transaction
| [**get_transaction_by_id**](docs/TransactionsApi.md#get_transaction_by_id) | Single transaction
| [**get_transactions**](docs/TransactionsApi.md#get_transactions) | List transactions
| [**get_transactions_by_account**](docs/TransactionsApi.md#get_transactions_by_account) | List account transactions
| [**get_transactions_by_category**](docs/TransactionsApi.md#get_transactions_by_category) | List category transactions, excluding any pending transactions
| [**get_transactions_by_month**](docs/TransactionsApi.md#get_transactions_by_month) | List transactions in month, excluding any pending transactions
| [**get_transactions_by_payee**](docs/TransactionsApi.md#get_transactions_by_payee) | List payee transactions, excluding any pending transactions
| [**import_transactions**](docs/TransactionsApi.md#import_transactions) | Import transactions
| [**update_transaction**](docs/TransactionsApi.md#update_transaction) | Updates an existing transaction
| [**update_transactions**](docs/TransactionsApi.md#update_transactions) | Update multiple transactions
## Versioning
The version of this client is defined in the `pyproject.toml` file and follows [semantic versioning](https://semver.org/). 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](https://api.ynab.com/papi/open_api_spec.yaml)). 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
Raw data
{
"_id": null,
"home_page": "https://github.com/ynab/ynab-sdk-python",
"name": "ynab",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "YNAB API Endpoints, finance, ynab, budgeting, api",
"author": "YNAB",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/ce/03/e20b5224ac3bb46a49f67273a1fdc13cca4f111afefb65a915d88d3a4a72/ynab-1.0.1.tar.gz",
"platform": null,
"description": "# YNAB API Python Library\n\n[](https://github.com/ynab/ynab-sdk-ruby/actions/workflows/build-test.yml)\n\nThis is the Python client for the YNAB API.\n\nPlease read the [YNAB API documentation](https://api.ynab.com) for an\noverview of using the API and a complete list of available resources.\n\nThis client is generated using the [OpenAPI Generator](https://openapi-generator.tech/).\n\n## Requirements\n\nPython 3.8+\n\n## Installation\n\nFirst, install the package using pip:\n\n```sh\npip install ynab\n```\n\nThen import the package:\n```python\nimport ynab\n```\n\n## Usage\n\nTo use this client, you must\n[obtain an access token](https://api.ynab.com/#authentication-overview) from\nthe [Account Settings](https://app.ynab.com/settings) area of the YNAB web\napplication.\n\n```python\nimport ynab\n\nconfiguration = ynab.Configuration(\n access_token = \"b43439eaafe2_this_is_fake_b43439eaafe2\"\n)\n\nwith ynab.ApiClient(configuration) as api_client:\n budgets_api = ynab.BudgetsApi(api_client)\n budgets_response = budgets_api.get_budgets()\n budgets = budgets_response.data.budgets\n \n for budget in budgets:\n print(budget.name) \n```\n\n## Methods\n\nClass | Method | Description\n------------ | ------------- | -------------\n**UserApi** | [**get_user**](docs/UserApi.md#get_user) | User info\n**AccountsApi** | [**create_account**](docs/AccountsApi.md#create_account) | Create a new account\n | [**get_account_by_id**](docs/AccountsApi.md#get_account_by_id) | Single account\n | [**get_accounts**](docs/AccountsApi.md#get_accounts) | Account list\n**BudgetsApi** | [**get_budget_by_id**](docs/BudgetsApi.md#get_budget_by_id) | Single budget\n | [**get_budget_settings_by_id**](docs/BudgetsApi.md#get_budget_settings_by_id) | Budget Settings\n | [**get_budgets**](docs/BudgetsApi.md#get_budgets) | List budgets\n**CategoriesApi** | [**get_categories**](docs/CategoriesApi.md#get_categories) | List categories\n | [**get_category_by_id**](docs/CategoriesApi.md#get_category_by_id) | Single category\n | [**get_month_category_by_id**](docs/CategoriesApi.md#get_month_category_by_id) | Single category for a specific budget month\n | [**update_category**](docs/CategoriesApi.md#update_category) | Update a category\n | [**update_month_category**](docs/CategoriesApi.md#update_month_category) | Update a category for a specific month\n**MonthsApi** | [**get_budget_month**](docs/MonthsApi.md#get_budget_month) | Single budget month\n | [**get_budget_months**](docs/MonthsApi.md#get_budget_months) | List budget months\n**PayeeLocationsApi** | [**get_payee_location_by_id**](docs/PayeeLocationsApi.md#get_payee_location_by_id) | Single payee location\n | [**get_payee_locations**](docs/PayeeLocationsApi.md#get_payee_locations) | List payee locations\n | [**get_payee_locations_by_payee**](docs/PayeeLocationsApi.md#get_payee_locations_by_payee) | List locations for a payee\n**PayeesApi** | [**get_payee_by_id**](docs/PayeesApi.md#get_payee_by_id) | Single payee\n | [**get_payees**](docs/PayeesApi.md#get_payees) | List payees\n | [**update_payee**](docs/PayeesApi.md#update_payee) | Update a payee\n**ScheduledTransactionsApi** | [**create_scheduled_transaction**](docs/ScheduledTransactionsApi.md#create_scheduled_transaction) | Create a single scheduled transaction\n | [**get_scheduled_transaction_by_id**](docs/ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | Single scheduled transaction\n | [**get_scheduled_transactions**](docs/ScheduledTransactionsApi.md#get_scheduled_transactions) | List scheduled transactions\n**TransactionsApi** | [**create_transaction**](docs/TransactionsApi.md#create_transaction) | Create a single transaction or multiple transactions\n | [**delete_transaction**](docs/TransactionsApi.md#delete_transaction) | Deletes an existing transaction\n | [**get_transaction_by_id**](docs/TransactionsApi.md#get_transaction_by_id) | Single transaction\n | [**get_transactions**](docs/TransactionsApi.md#get_transactions) | List transactions\n | [**get_transactions_by_account**](docs/TransactionsApi.md#get_transactions_by_account) | List account transactions\n | [**get_transactions_by_category**](docs/TransactionsApi.md#get_transactions_by_category) | List category transactions, excluding any pending transactions\n | [**get_transactions_by_month**](docs/TransactionsApi.md#get_transactions_by_month) | List transactions in month, excluding any pending transactions\n | [**get_transactions_by_payee**](docs/TransactionsApi.md#get_transactions_by_payee) | List payee transactions, excluding any pending transactions\n | [**import_transactions**](docs/TransactionsApi.md#import_transactions) | Import transactions\n | [**update_transaction**](docs/TransactionsApi.md#update_transaction) | Updates an existing transaction\n | [**update_transactions**](docs/TransactionsApi.md#update_transactions) | Update multiple transactions\n\n## Versioning\n\nThe version of this client is defined in the `pyproject.toml` file and follows [semantic versioning](https://semver.org/). 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](https://api.ynab.com/papi/open_api_spec.yaml)). 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.\n\n## License\n\nCopyright (c) 2025 You Need A Budget, LLC\n\nLicensed under the Apache-2.0 license",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Official Python client for the YNAB API. API documentation available at https://api.ynab.com. Generated from server specification version 1.72.1",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/ynab/ynab-sdk-python",
"Repository": "https://github.com/ynab/ynab-sdk-python"
},
"split_keywords": [
"ynab api endpoints",
" finance",
" ynab",
" budgeting",
" api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0c1af9365e4f0f8f45aae503b30db32da71d524db47801c34b88b7864aa07dc2",
"md5": "375ece5872924e55e710c8ee0f1beab5",
"sha256": "9592ee05b4370a7d6ef83366cc598e94aafeaf751cc469a4bd89ef6aa324c67a"
},
"downloads": -1,
"filename": "ynab-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "375ece5872924e55e710c8ee0f1beab5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 205182,
"upload_time": "2024-12-31T21:03:51",
"upload_time_iso_8601": "2024-12-31T21:03:51.125259Z",
"url": "https://files.pythonhosted.org/packages/0c/1a/f9365e4f0f8f45aae503b30db32da71d524db47801c34b88b7864aa07dc2/ynab-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ce03e20b5224ac3bb46a49f67273a1fdc13cca4f111afefb65a915d88d3a4a72",
"md5": "8cd6ed6099cb3d68ca87f5abe83a3f6f",
"sha256": "6c284673fe721c14261d926c0af5b3638a62bb10bde88d678ba9e9921e4ef00c"
},
"downloads": -1,
"filename": "ynab-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "8cd6ed6099cb3d68ca87f5abe83a3f6f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 66790,
"upload_time": "2024-12-31T21:03:52",
"upload_time_iso_8601": "2024-12-31T21:03:52.451930Z",
"url": "https://files.pythonhosted.org/packages/ce/03/e20b5224ac3bb46a49f67273a1fdc13cca4f111afefb65a915d88d3a4a72/ynab-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-31 21:03:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ynab",
"github_project": "ynab-sdk-python",
"github_not_found": true,
"lcname": "ynab"
}