Lunch Money API - v2
Project description
lunchmoney-python
Welcome to the Lunch Money v2 API. The API is available at https://api.lunchmoney.dev/v2. Get your access token from the Lunch Money developers page.
Introduction
<span class="red-text">The v2 API is in open alpha and is still subject to change. Use the mock server or a test budget when getting started.
Static Mock Server
Explore the API without an access token or risk to real data. Select "Static Mock v2 Lunch Money API Server" from the Server dropdown, then set your Bearer token to any string with 11 or more characters.
Migrating from v1
The v2 API is not backwards compatible with v1. See the Migration Guide for details.
Useful links
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 2.9.3
- Package version: 2.24.0
- Generator version: 7.17.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements.
Python 3.9+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/juftin/lunchmoney-clients.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/juftin/lunchmoney-clients.git)
Then import the package:
import lunchmoney
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import lunchmoney
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import lunchmoney
from lunchmoney.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.lunchmoney.dev/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = lunchmoney.Configuration(
host = "https://api.lunchmoney.dev/v2"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'
# Configure Bearer authorization (JWT): bearerSecurity
configuration = lunchmoney.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with lunchmoney.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lunchmoney.BudgetsApi(api_client)
category_id = 56 # int | Category ID of the budget to delete
start_date = '2013-10-20' # date | Start date of the budget period in ISO 8601 date format (YYYY-MM-DD)
try:
# Delete budget
api_instance.delete_budget(category_id, start_date)
except ApiException as e:
print("Exception when calling BudgetsApi->delete_budget: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://api.lunchmoney.dev/v2
| Class | Method | HTTP request | Description |
|---|---|---|---|
| BudgetsApi | delete_budget | DELETE /budgets | Delete budget |
| BudgetsApi | get_budget_settings | GET /budgets/settings | Get budget settings |
| BudgetsApi | upsert_budget | PUT /budgets | Upsert budget |
| CategoriesApi | create_category | POST /categories | Create a new category or category group |
| CategoriesApi | delete_category | DELETE /categories/{id} | Delete a category or category group |
| CategoriesApi | get_all_categories | GET /categories | Get all categories |
| CategoriesApi | get_category_by_id | GET /categories/{id} | Get a single category |
| CategoriesApi | update_category | PUT /categories/{id} | Update an existing category or category group |
| ManualAccountsApi | create_manual_account | POST /manual_accounts | Create a manual account |
| ManualAccountsApi | delete_manual_account | DELETE /manual_accounts/{id} | Delete a manual account |
| ManualAccountsApi | get_all_manual_accounts | GET /manual_accounts | Get all manual accounts |
| ManualAccountsApi | get_manual_account_by_id | GET /manual_accounts/{id} | Get a single manual account |
| ManualAccountsApi | update_manual_account | PUT /manual_accounts/{id} | Update an existing manual account |
| MeApi | get_me | GET /me | Get current user |
| PlaidAccountsApi | get_all_plaid_accounts | GET /plaid_accounts | Get all accounts synced via Plaid |
| PlaidAccountsApi | get_plaid_account_by_id | GET /plaid_accounts/{id} | Get a single account that is synced via Plaid |
| PlaidAccountsApi | trigger_plaid_account_fetch | POST /plaid_accounts/fetch | Trigger Fetch from Plaid |
| RecurringItemsApi | get_all_recurring | GET /recurring_items | Get all recurring items |
| RecurringItemsApi | get_recurring_by_id | GET /recurring_items/{id} | Get a single recurring item |
| SummaryApi | get_budget_summary | GET /summary | Get summary |
| TagsApi | create_tag | POST /tags | Create a new tag |
| TagsApi | delete_tag | DELETE /tags/{id} | Delete a tag |
| TagsApi | get_all_tags | GET /tags | Get All Tags |
| TagsApi | get_tag_by_id | GET /tags/{id} | Get a single tag |
| TagsApi | update_tag | PUT /tags/{id} | Update an existing tag |
| TransactionsApi | delete_transaction_by_id | DELETE /transactions/{id} | Delete a transaction |
| TransactionsApi | get_transaction_by_id | GET /transactions/{id} | Get a single transaction |
| TransactionsApi | update_transaction | PUT /transactions/{id} | Update an existing transaction |
| TransactionsBulkApi | create_new_transactions | POST /transactions | Insert one or more transactions. |
| TransactionsBulkApi | delete_transactions | DELETE /transactions | Bulk delete existing transactions |
| TransactionsBulkApi | get_all_transactions | GET /transactions | Get all transactions |
| TransactionsBulkApi | update_transactions | PUT /transactions | Update multiple transactions |
| TransactionsFilesApi | attach_file_to_transaction | POST /transactions/{transaction_id}/attachments | Attach a file to a transaction |
| TransactionsFilesApi | delete_transaction_attachment | DELETE /transactions/attachments/{file_id} | Delete a file attachment |
| TransactionsFilesApi | get_transaction_attachment_url | GET /transactions/attachments/{file_id} | Get a url to download a file attachment |
| TransactionsGroupApi | group_transactions | POST /transactions/group | Create a transaction group |
| TransactionsGroupApi | ungroup_transactions | DELETE /transactions/group/{id} | Delete a transaction group |
| TransactionsSplitApi | split_transaction | POST /transactions/split/{id} | Split a transaction |
| TransactionsSplitApi | unsplit_transaction | DELETE /transactions/split/{id} | Unsplit a previously split transactions |
Documentation For Models
- AccountTypeEnum
- BudgetInvalidPeriodErrorObject
- BudgetObject
- BudgetSettingsResponseObject
- BudgetUpsertResponseObject
- CategoryObject
- ChildCategoryObject
- ChildTransactionObject
- CreateCategoryRequestObject
- CreateCategoryRequestObjectChildrenInner
- CreateManualAccountRequestObject
- CreateManualAccountRequestObjectBalance
- CreateManualAccountRequestObjectClosedOn
- CreateNewTransactionsRequest
- CreateTagRequestObject
- CurrencyEnum
- DeleteCategoryResponseWithDependencies
- DeleteCategoryResponseWithDependenciesDependents
- DeleteTagResponseWithDependencies
- DeleteTagResponseWithDependenciesDependents
- DeleteTransactionsRequest
- ErrorResponseObject
- ErrorResponseObjectErrorsInner
- GetAllCategories200Response
- GetAllManualAccounts200Response
- GetAllPlaidAccounts200Response
- GetAllRecurring200Response
- GetAllTags200Response
- GetAllTransactions200Response
- GetAllTransactionsCreatedSinceParameter
- GetTransactionAttachmentUrl200Response
- GroupTransactionsRequest
- InsertTransactionObject
- InsertTransactionObjectAmount
- InsertTransactionsResponseObject
- ManualAccountObject
- PlaidAccountObject
- RecurringObject
- RecurringObjectMatches
- RecurringObjectMatchesFoundTransactionsInner
- RecurringObjectOverrides
- RecurringObjectTransactionCriteria
- SkippedExistingExternalIdObject
- SplitTransactionObject
- SplitTransactionObjectAmount
- SplitTransactionRequest
- SummaryCategoryObject
- SummaryCategoryOccurrenceObject
- SummaryCategoryTotalsObject
- SummaryRecurringTransactionObject
- SummaryResponseObject
- SummaryRolloverPoolAdjustmentObject
- SummaryRolloverPoolObject
- SummaryTotalsBreakdownObject
- SummaryTotalsObject
- TagObject
- TransactionAttachmentObject
- TransactionObject
- UpdateCategoryRequestObject
- UpdateManualAccountRequestObject
- UpdateManualAccountRequestObjectBalance
- UpdateManualAccountRequestObjectClosedOn
- UpdateTagRequestObject
- UpdateTransactionObject
- UpdateTransactionObjectAmount
- UpdateTransactions200Response
- UpdateTransactionsRequest
- UpdateTransactionsRequestTransactionsInner
- UpsertBudget400Response
- UpsertBudgetRequestObject
- UpsertBudgetRequestObjectAmount
- UserObject
Documentation For Authorization
Authentication schemes defined for the API:
bearerSecurity
- Type: Bearer authentication (JWT)
cookieAuth
- Type: API key
- API key parameter name: _lm_access_token
- Location:
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lunchmoney_python-2.24.0.tar.gz.
File metadata
- Download URL: lunchmoney_python-2.24.0.tar.gz
- Upload date:
- Size: 138.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d02cd8ef6a537da26205b5fea3341b66d3f876353e1de567f51bba988e0b91b9
|
|
| MD5 |
258ad094a577291fe3c3532d786cc5b4
|
|
| BLAKE2b-256 |
647b46cc655838935d0796fec3211518a6c61f2f8416bc34672716b551e63468
|
File details
Details for the file lunchmoney_python-2.24.0-py3-none-any.whl.
File metadata
- Download URL: lunchmoney_python-2.24.0-py3-none-any.whl
- Upload date:
- Size: 271.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0eed94976ba12a590a3c87223ad69a9bdd70f969f03e9d9f5392f401edd16c5
|
|
| MD5 |
ba104fa7eee5d62b88b8ac5a8fcf16bf
|
|
| BLAKE2b-256 |
2e416925003302ee7f2400b7440ee41c0ef0df7eeb0153a06d86b497f6bb3766
|