lunchmoney-python 2.19.0
Lunch Money API - v2
License: Apache 2.0
Requires Python: >=3.9
Keywords: OpenAPI, OpenAPI-Generator, Lunch Money API - v2

# lunchmoney-python
Welcome to the Lunch Money v2 API.

A working version of this API is now available through these docs, or directly at:

`https://api.lunchmoney.dev/v2`

<span class=\"red-text\"><strong>This is in alpha launch of a major API update. It is still subject to change during this alpha review
period and bugs may still exist. Users are strongly encouraged to use the mock service or to create a test budget with example data as the first step to interacting with the v2 API.</strong></span>
See the [Getting Started Guide](https://alpha.lunchmoney.dev/v2/getting-started) for more information on using a test budget.<br<br>

If you are new to the v2 API, you may wish to review the [v2 API Overview of Changes](https://alpha.lunchmoney.dev/v2/changelog).

### Static Mock Server

You may also use these docs to explore the API using a static mock server endpoint.<p>
This enables users to become familiar with the API without having to create an access token, and eliminates the possibility of modifying real data. <p>
To access this endpoint select the second endpoint in the the \"Server\" dropdown to the right. When selected you should see \"Static Mock v2 Lunch Money API Server\".<br>
When using this server, set your Bearer token to any string with 11 or more characters.

### Migrating from V1

The v2 API is NOT backwards compatible with the v1 API. Developers are encouraged to review the [Migration Guide](https://alpha.lunchmoney.dev/v2/migration-guide) to understand the changes and plan their migration.

### Acknowledgments

If you have been providing feedback on the API during our iterative design process, **THANK YOU**. We are happy to provide the opportunity to finally interact with the working API that was built based on your feedback.

### Useful links:
- [Getting Started](https://alpha.lunchmoney.dev/v2/getting-started)
- [v2 API Changelog](https://alpha.lunchmoney.dev/v2/changelog)
- [Migration Guide](https://alpha.lunchmoney.dev/v2/migration-guide)
- [Rate Limits](https://alpha.lunchmoney.dev/v2/rate-limits)
- [Current v1 Lunch Money API Documentation](https://lunchmoney.dev)
- [Awesome Lunch Money Projects](https://github.com/lunch-money/awesome-lunchmoney?tab=readme-ov-file)

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 2.8.5
- Package version: 2.19.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:

```sh
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:
```python
import lunchmoney
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import lunchmoney
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

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.CategoriesApi(api_client)
    create_category_request_object = {"name":"API Created Category","description":"Test description of created category","is_income":false,"exclude_from_budget":true,"exclude_from_totals":false,"is_group":false} # CreateCategoryRequestObject | 

    try:
        # Create a new category or category group
        api_response = api_instance.create_category(create_category_request_object)
        print("The response of CategoriesApi->create_category:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CategoriesApi->create_category: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://api.lunchmoney.dev/v2*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*CategoriesApi* | [**create_category**](docs/CategoriesApi.md#create_category) | **POST** /categories | Create a new category or category group
*CategoriesApi* | [**delete_category**](docs/CategoriesApi.md#delete_category) | **DELETE** /categories/{id} | Delete a category or category group
*CategoriesApi* | [**get_all_categories**](docs/CategoriesApi.md#get_all_categories) | **GET** /categories | Get all categories
*CategoriesApi* | [**get_category_by_id**](docs/CategoriesApi.md#get_category_by_id) | **GET** /categories/{id} | Get a single category
*CategoriesApi* | [**update_category**](docs/CategoriesApi.md#update_category) | **PUT** /categories/{id} | Update an existing category or category group
*ManualAccountsApi* | [**create_manual_account**](docs/ManualAccountsApi.md#create_manual_account) | **POST** /manual_accounts | Create a manual account
*ManualAccountsApi* | [**delete_manual_account**](docs/ManualAccountsApi.md#delete_manual_account) | **DELETE** /manual_accounts/{id} | Delete a manual account
*ManualAccountsApi* | [**get_all_manual_accounts**](docs/ManualAccountsApi.md#get_all_manual_accounts) | **GET** /manual_accounts | Get all manual accounts
*ManualAccountsApi* | [**get_manual_account_by_id**](docs/ManualAccountsApi.md#get_manual_account_by_id) | **GET** /manual_accounts/{id} | Get a single manual account
*ManualAccountsApi* | [**update_manual_account**](docs/ManualAccountsApi.md#update_manual_account) | **PUT** /manual_accounts/{id} | Update an existing manual account
*MeApi* | [**get_me**](docs/MeApi.md#get_me) | **GET** /me | Get current user
*PlaidAccountsApi* | [**get_all_plaid_accounts**](docs/PlaidAccountsApi.md#get_all_plaid_accounts) | **GET** /plaid_accounts | Get all accounts synced via Plaid
*PlaidAccountsApi* | [**get_plaid_account_by_id**](docs/PlaidAccountsApi.md#get_plaid_account_by_id) | **GET** /plaid_accounts/{id} | Get a single account that is synced via Plaid
*PlaidAccountsApi* | [**trigger_plaid_account_fetch**](docs/PlaidAccountsApi.md#trigger_plaid_account_fetch) | **POST** /plaid_accounts/fetch | Trigger Fetch from Plaid
*RecurringItemsApi* | [**get_all_recurring**](docs/RecurringItemsApi.md#get_all_recurring) | **GET** /recurring_items | Get all recurring items
*RecurringItemsApi* | [**get_recurring_by_id**](docs/RecurringItemsApi.md#get_recurring_by_id) | **GET** /recurring_items/{id} | Get a single recurring item
*SummaryApi* | [**get_budget_summary**](docs/SummaryApi.md#get_budget_summary) | **GET** /summary | Get summary
*TagsApi* | [**create_tag**](docs/TagsApi.md#create_tag) | **POST** /tags | Create a new tag
*TagsApi* | [**delete_tag**](docs/TagsApi.md#delete_tag) | **DELETE** /tags/{id} | Delete a tag
*TagsApi* | [**get_all_tags**](docs/TagsApi.md#get_all_tags) | **GET** /tags | Get All Tags
*TagsApi* | [**get_tag_by_id**](docs/TagsApi.md#get_tag_by_id) | **GET** /tags/{id} | Get a single tag
*TagsApi* | [**update_tag**](docs/TagsApi.md#update_tag) | **PUT** /tags/{id} | Update an existing tag
*TransactionsApi* | [**delete_transaction_by_id**](docs/TransactionsApi.md#delete_transaction_by_id) | **DELETE** /transactions/{id} | Delete a transaction
*TransactionsApi* | [**get_transaction_by_id**](docs/TransactionsApi.md#get_transaction_by_id) | **GET** /transactions/{id} | Get a single transaction
*TransactionsApi* | [**update_transaction**](docs/TransactionsApi.md#update_transaction) | **PUT** /transactions/{id} | Update an existing transaction
*TransactionsBulkApi* | [**create_new_transactions**](docs/TransactionsBulkApi.md#create_new_transactions) | **POST** /transactions | Insert one or more transactions.
*TransactionsBulkApi* | [**delete_transactions**](docs/TransactionsBulkApi.md#delete_transactions) | **DELETE** /transactions | Bulk delete existing transactions
*TransactionsBulkApi* | [**get_all_transactions**](docs/TransactionsBulkApi.md#get_all_transactions) | **GET** /transactions | Get all transactions
*TransactionsBulkApi* | [**update_transactions**](docs/TransactionsBulkApi.md#update_transactions) | **PUT** /transactions | Update multiple transactions
*TransactionsFilesApi* | [**attach_file_to_transaction**](docs/TransactionsFilesApi.md#attach_file_to_transaction) | **POST** /transactions/{transaction_id}/attachments | Attach a file to a transaction
*TransactionsFilesApi* | [**delete_transaction_attachment**](docs/TransactionsFilesApi.md#delete_transaction_attachment) | **DELETE** /transactions/attachments/{file_id} | Delete a file attachment
*TransactionsFilesApi* | [**get_transaction_attachment_url**](docs/TransactionsFilesApi.md#get_transaction_attachment_url) | **GET** /transactions/attachments/{file_id} | Get a url to download a file attachment
*TransactionsGroupApi* | [**group_transactions**](docs/TransactionsGroupApi.md#group_transactions) | **POST** /transactions/group | Create a transaction group
*TransactionsGroupApi* | [**ungroup_transactions**](docs/TransactionsGroupApi.md#ungroup_transactions) | **DELETE** /transactions/group/{id} | Delete a transaction group
*TransactionsSplitApi* | [**split_transaction**](docs/TransactionsSplitApi.md#split_transaction) | **POST** /transactions/split/{id} | Split a transaction
*TransactionsSplitApi* | [**unsplit_transaction**](docs/TransactionsSplitApi.md#unsplit_transaction) | **DELETE** /transactions/split/{id} | Unsplit a previously split transactions


## Documentation For Models

 - [AccountTypeEnum](docs/AccountTypeEnum.md)
 - [AlignedCategoryTotalsObject](docs/AlignedCategoryTotalsObject.md)
 - [AlignedSummaryCategoryObject](docs/AlignedSummaryCategoryObject.md)
 - [AlignedSummaryResponseObject](docs/AlignedSummaryResponseObject.md)
 - [CategoryObject](docs/CategoryObject.md)
 - [ChildCategoryObject](docs/ChildCategoryObject.md)
 - [ChildTransactionObject](docs/ChildTransactionObject.md)
 - [CreateCategoryRequestObject](docs/CreateCategoryRequestObject.md)
 - [CreateCategoryRequestObjectChildrenInner](docs/CreateCategoryRequestObjectChildrenInner.md)
 - [CreateManualAccountRequestObject](docs/CreateManualAccountRequestObject.md)
 - [CreateManualAccountRequestObjectBalance](docs/CreateManualAccountRequestObjectBalance.md)
 - [CreateManualAccountRequestObjectClosedOn](docs/CreateManualAccountRequestObjectClosedOn.md)
 - [CreateNewTransactionsRequest](docs/CreateNewTransactionsRequest.md)
 - [CreateTagRequestObject](docs/CreateTagRequestObject.md)
 - [CurrencyEnum](docs/CurrencyEnum.md)
 - [DeleteCategoryResponseWithDependencies](docs/DeleteCategoryResponseWithDependencies.md)
 - [DeleteCategoryResponseWithDependenciesDependents](docs/DeleteCategoryResponseWithDependenciesDependents.md)
 - [DeleteTagResponseWithDependencies](docs/DeleteTagResponseWithDependencies.md)
 - [DeleteTagResponseWithDependenciesDependents](docs/DeleteTagResponseWithDependenciesDependents.md)
 - [DeleteTransactionsRequest](docs/DeleteTransactionsRequest.md)
 - [ErrorResponseObject](docs/ErrorResponseObject.md)
 - [ErrorResponseObjectErrorsInner](docs/ErrorResponseObjectErrorsInner.md)
 - [GetAllCategories200Response](docs/GetAllCategories200Response.md)
 - [GetAllManualAccounts200Response](docs/GetAllManualAccounts200Response.md)
 - [GetAllPlaidAccounts200Response](docs/GetAllPlaidAccounts200Response.md)
 - [GetAllRecurring200Response](docs/GetAllRecurring200Response.md)
 - [GetAllTags200Response](docs/GetAllTags200Response.md)
 - [GetAllTransactions200Response](docs/GetAllTransactions200Response.md)
 - [GetAllTransactionsCreatedSinceParameter](docs/GetAllTransactionsCreatedSinceParameter.md)
 - [GetBudgetSummary200Response](docs/GetBudgetSummary200Response.md)
 - [GetTransactionAttachmentUrl200Response](docs/GetTransactionAttachmentUrl200Response.md)
 - [GroupTransactionsRequest](docs/GroupTransactionsRequest.md)
 - [InsertTransactionObject](docs/InsertTransactionObject.md)
 - [InsertTransactionObjectAmount](docs/InsertTransactionObjectAmount.md)
 - [InsertTransactionsResponseObject](docs/InsertTransactionsResponseObject.md)
 - [ManualAccountObject](docs/ManualAccountObject.md)
 - [NonAlignedCategoryTotalsObject](docs/NonAlignedCategoryTotalsObject.md)
 - [NonAlignedSummaryCategoryObject](docs/NonAlignedSummaryCategoryObject.md)
 - [NonAlignedSummaryResponseObject](docs/NonAlignedSummaryResponseObject.md)
 - [PlaidAccountObject](docs/PlaidAccountObject.md)
 - [RecurringObject](docs/RecurringObject.md)
 - [RecurringObjectMatches](docs/RecurringObjectMatches.md)
 - [RecurringObjectMatchesFoundTransactionsInner](docs/RecurringObjectMatchesFoundTransactionsInner.md)
 - [RecurringObjectOverrides](docs/RecurringObjectOverrides.md)
 - [RecurringObjectTransactionCriteria](docs/RecurringObjectTransactionCriteria.md)
 - [SkippedExistingExternalIdObject](docs/SkippedExistingExternalIdObject.md)
 - [SplitTransactionObject](docs/SplitTransactionObject.md)
 - [SplitTransactionObjectAmount](docs/SplitTransactionObjectAmount.md)
 - [SplitTransactionRequest](docs/SplitTransactionRequest.md)
 - [SummaryCategoryOccurrenceObject](docs/SummaryCategoryOccurrenceObject.md)
 - [SummaryRecurringTransactionObject](docs/SummaryRecurringTransactionObject.md)
 - [SummaryRolloverPoolAdjustmentObject](docs/SummaryRolloverPoolAdjustmentObject.md)
 - [SummaryRolloverPoolObject](docs/SummaryRolloverPoolObject.md)
 - [SummaryTotalsBreakdownObject](docs/SummaryTotalsBreakdownObject.md)
 - [SummaryTotalsObject](docs/SummaryTotalsObject.md)
 - [TagObject](docs/TagObject.md)
 - [TransactionAttachmentObject](docs/TransactionAttachmentObject.md)
 - [TransactionObject](docs/TransactionObject.md)
 - [UpdateCategoryRequestObject](docs/UpdateCategoryRequestObject.md)
 - [UpdateManualAccountRequestObject](docs/UpdateManualAccountRequestObject.md)
 - [UpdateManualAccountRequestObjectBalance](docs/UpdateManualAccountRequestObjectBalance.md)
 - [UpdateManualAccountRequestObjectClosedOn](docs/UpdateManualAccountRequestObjectClosedOn.md)
 - [UpdateTagRequestObject](docs/UpdateTagRequestObject.md)
 - [UpdateTransactionObject](docs/UpdateTransactionObject.md)
 - [UpdateTransactionObjectAmount](docs/UpdateTransactionObjectAmount.md)
 - [UpdateTransactions200Response](docs/UpdateTransactions200Response.md)
 - [UpdateTransactionsRequest](docs/UpdateTransactionsRequest.md)
 - [UpdateTransactionsRequestTransactionsInner](docs/UpdateTransactionsRequestTransactionsInner.md)
 - [UserObject](docs/UserObject.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="bearerSecurity"></a>
### bearerSecurity

- **Type**: Bearer authentication (JWT)

<a id="cookieAuth"></a>
### cookieAuth

- **Type**: API key
- **API key parameter name**: _lm_access_token
- **Location**: 


## Author

devsupport@lunchmoney.app