Skip to main content

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

Project description

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

Class Method Description
UserApi get_user User info
AccountsApi create_account Create a new account
  get_account_by_id Single account
  get_accounts Account list
BudgetsApi get_budget_by_id Single budget
  get_budget_settings_by_id Budget Settings
  get_budgets List budgets
CategoriesApi get_categories List categories
  get_category_by_id Single category
  get_month_category_by_id Single category for a specific budget month
  update_category Update a category
  update_month_category Update a category for a specific month
MonthsApi get_budget_month Single budget month
  get_budget_months List budget months
PayeeLocationsApi get_payee_location_by_id Single payee location
  get_payee_locations List payee locations
  get_payee_locations_by_payee List locations for a payee
PayeesApi get_payee_by_id Single payee
  get_payees List payees
  update_payee Update a payee
ScheduledTransactionsApi create_scheduled_transaction Create a single scheduled transaction
  get_scheduled_transaction_by_id Single scheduled transaction
  get_scheduled_transactions List scheduled transactions
  update_scheduled_transaction Update an existing scheduled transactions
  delete_scheduled_transaction Delete an existing scheduled transaction
TransactionsApi create_transaction Create a single transaction or multiple transactions
  delete_transaction Deletes an existing transaction
  get_transaction_by_id Single transaction
  get_transactions List transactions
  get_transactions_by_account List account transactions
  get_transactions_by_category List category transactions, excluding any pending transactions
  get_transactions_by_month List transactions in month, excluding any pending transactions
  get_transactions_by_payee List payee transactions, excluding any pending transactions
  import_transactions Import transactions
  update_transaction Updates an existing transaction
  update_transactions Update 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

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

ynab-1.3.1.tar.gz (63.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ynab-1.3.1-py3-none-any.whl (207.5 kB view details)

Uploaded Python 3

File details

Details for the file ynab-1.3.1.tar.gz.

File metadata

  • Download URL: ynab-1.3.1.tar.gz
  • Upload date:
  • Size: 63.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for ynab-1.3.1.tar.gz
Algorithm Hash digest
SHA256 aab49f7ed4ff6be9b0c39e693cd73eedf0f434f02fd57185f507f16209898633
MD5 9ae9499af821aab713a5e8d3d5e8465e
BLAKE2b-256 7e0eacb52c872168ade7d80029fec48cd5c9251de22710d53995541794faec3d

See more details on using hashes here.

File details

Details for the file ynab-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: ynab-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 207.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for ynab-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c2428aee7a83138d8bebe9d359d279f864605b6c86234c03f65f65a7ef0d356b
MD5 7fc093de83f8d40515bdf1067e591142
BLAKE2b-256 e4a82e6590d744e67c8d104058412f21177c1a318d4f36f8309f5fe13dd9ad4c

See more details on using hashes here.

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