Package: ynab-sdk
ynab-sdk-pythonPython implementation of the YNAB API (https://api.youneedabudget.com/)InstallationUse the package managerpipto installynab-sdk-pythonpipinstallynab-sdkUsageExample of use with the default client:fromynab_sdkimportYNABynab=YNAB('some-key')print(ynab.budgets.get_budgets())Example of use with the cached client:fromynab_sdkimportYNABfromynab_sdk.utils.clients.cached_clientimportCachedClientfromynab_sdk.utils.configurations.cachedimportCachedConfigynab_config=CachedConfig(redis_host='redis-host',redis_port='redis-port',redis_db='redis-db',redis_pass='redis-password',api_key='some-key',)ynab_client=CachedClient(ynab_config)ynab=YNAB(client=ynab_client)# clear the cacheynab_client.clear_cache()# set the cached data expiration time in seconds# if set to 0, negative or None, the cached data never expires# default value is 3600 seconds (1 hour)ynab_config.redis_ttl=120print(ynab.budgets.get_budgets())EndpointsSee below whats implemented (Not fully updated yet)EndpointVerbDescriptionWorkingObs/userGETReturns authenticated user informationNO/budgetsGETReturns budgets list with summary informationYES/budgets/{budget_id}GETReturns a single budget with all related entities.  This resource is effectively a full budget export.YES/budgets/{budget_id}/settingsGETReturns settings for a budgetYES/budgets/{budget_id}/accountsGETReturns all accountsYES/budgets/{budget_id}/accounts/{account_id}GETReturns a single accountYES/budgets/{budget_id}/accountsPOSTCreates a new accountYES/budgets/{budget_id}/categoriesGETReturns all categories grouped by category group.  Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC)./budgets/{budget_id}/categories/{category_id}GETReturns a single category.  Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC)./budgets/{budget_id}/months/{month}/categories/{category_id}GETReturns a single category for a specific budget month.  Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC)./budgets/{budget_id}/months/{month}/categories/{category_id}PATCHUpdate a category for a specific month/budgets/{budget_id}/payeesGETReturns all payeesYES/budgets/{budget_id}/payees/{payee_id}GETReturns single payeeYES/budgets/{budget_id}/payee_locationsGETReturns all payee locationsNO/budgets/{budget_id}/payee_locations/{payee_location_id}GETReturns a single payee locationNO/budgets/{budget_id}/payees/{payee_id}/payee_locationsGETReturns all payee locations for the specified payeeNO/budgets/{budget_id}/monthsGETReturns all budget monthsNO/budgets/{budget_id}/months/{month}GETReturns a single budget monthNO/budgets/{budget_id}/transactionsGETReturns budget transactionsYES/budgets/{budget_id}/transactionsPOSTCreates a single transaction or multiple transactions.  If you provide a body containing a 'transaction' object, a single transaction will be created and if you provide a body containing a 'transactions' array, multiple transactions will be created.YES/budgets/{budget_id}/transactionsPATCHUpdates multiple transactions, by 'id' or 'import_id'.NO/budgets/{budget_id}/transactions/{transaction_id}GETReturns a single transactionYES/budgets/{budget_id}/transactions/{transaction_id}PUTUpdates a transactionYES/budgets/{budget_id}/transactions/bulkPOSTCreates multiple transactions.  Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions.NO/budgets/{budget_id}/accounts/{account_id}/transactionsGETReturns all transactions for a specified accountYES/budgets/{budget_id}/categories/{category_id}/transactionsGETReturns all transactions for a specified categoryNO/budgets/{budget_id}/payees/{payee_id}/transactionsGETReturns all transactions for a specified payeeNO/budgets/{budget_id}/scheduled_transactionsGETReturns all scheduled transactionsNO/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}GETReturns a single scheduled transactionNOContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseApache License 2.0