🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

ynab

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ynab

Official Python client for the YNAB API. API documentation available at https://api.ynab.com. Generated from server specification version 1.74.0

1.4.0
Maintainers
1

YNAB API Python Library

Build PyPI version

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

ClassMethodDescription
UserApiget_userUser info
AccountsApicreate_accountCreate a new account
 get_account_by_idSingle account
 get_accountsAccount list
BudgetsApiget_budget_by_idSingle budget
 get_budget_settings_by_idBudget Settings
 get_budgetsList budgets
CategoriesApiget_categoriesList categories
 get_category_by_idSingle category
 get_month_category_by_idSingle category for a specific budget month
 update_categoryUpdate a category
 update_month_categoryUpdate a category for a specific month
MonthsApiget_budget_monthSingle budget month
 get_budget_monthsList budget months
PayeeLocationsApiget_payee_location_by_idSingle payee location
 get_payee_locationsList payee locations
 get_payee_locations_by_payeeList locations for a payee
PayeesApiget_payee_by_idSingle payee
 get_payeesList payees
 update_payeeUpdate a payee
ScheduledTransactionsApicreate_scheduled_transactionCreate a single scheduled transaction
 get_scheduled_transaction_by_idSingle scheduled transaction
 get_scheduled_transactionsList scheduled transactions
 update_scheduled_transactionUpdate an existing scheduled transactions
 delete_scheduled_transactionDelete an existing scheduled transaction
TransactionsApicreate_transactionCreate a single transaction or multiple transactions
 delete_transactionDeletes an existing transaction
 get_transaction_by_idSingle transaction
 get_transactionsList transactions
 get_transactions_by_accountList account transactions
 get_transactions_by_categoryList category transactions, excluding any pending transactions
 get_transactions_by_monthList transactions in month, excluding any pending transactions
 get_transactions_by_payeeList payee transactions, excluding any pending transactions
 import_transactionsImport transactions
 update_transactionUpdates an existing transaction
 update_transactionsUpdate multiple transactions

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts