-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
864 additions
and
1,105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# lunchable CLI | ||
|
||
```bash exec="on" source="above" result="markdown" | ||
lunchable --help | ||
``` | ||
|
||
::: mkdocs-click | ||
:module: lunchable._cli | ||
:command: cli | ||
:prog_name: lunchable | ||
:style: table | ||
:list_subcommands: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" | ||
Generate the code reference pages and navigation. | ||
""" | ||
|
||
import logging | ||
from pathlib import Path | ||
|
||
import mkdocs_gen_files | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
project_dir = Path(__file__).resolve().parent.parent | ||
source_code = project_dir.joinpath("lunchable") | ||
|
||
for path in sorted(source_code.rglob("*.py")): | ||
module_path = path.relative_to(project_dir).with_suffix("") | ||
doc_path = path.relative_to(source_code).with_suffix(".md") | ||
full_doc_path = Path("reference", doc_path) | ||
|
||
parts = tuple(module_path.parts) | ||
if parts[-1] == "__init__": | ||
parts = parts[:-1] | ||
doc_path = doc_path.with_name("index.md") | ||
full_doc_path = full_doc_path.with_name("index.md") | ||
elif parts[-1] == "__main__": | ||
continue | ||
with mkdocs_gen_files.open(full_doc_path, "w") as fd: | ||
fd.write(f"# `{parts[-1]}`\n\n::: {'.'.join(parts)}") | ||
|
||
mkdocs_gen_files.set_edit_path(full_doc_path, path) | ||
|
||
# Exclude parts that are between two exact `<!--skip-->` lines | ||
readme_content = Path("README.md").read_text() | ||
readme_content = "\n".join(readme_content.split("\n<!--skip-->\n")[::2]) | ||
with mkdocs_gen_files.open("index.md", "w") as index_file: | ||
index_file.write(readme_content) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# LunchMoney | ||
|
||
The `LunchMoney` client is the main entrypoint for interacting with the Lunch Money API. | ||
It defaults to inheriting the `LUNCHMONEY_ACCESS_TOKEN` environment variable, but can be | ||
created with an explicit `access_token` parameter. | ||
|
||
```python | ||
from lunchable import LunchMoney | ||
|
||
lunch = LunchMoney(access_token="xxxxxxxxxxx") | ||
``` | ||
|
||
## Methods | ||
|
||
| HTTP Verb | Name | Description | | ||
|-----------|--------------------------------------------------------------------------------|--------------------------------------------------------------------------| | ||
| GET | [get_assets](#lunchable.LunchMoney.get_assets) | Get Manually Managed Assets | | ||
| GET | [get_budgets](#lunchable.LunchMoney.get_budgets) | Get Monthly Budgets | | ||
| GET | [get_categories](#lunchable.LunchMoney.get_categories) | Get Spending categories | | ||
| GET | [get_category](#lunchable.LunchMoney.get_category) | Get single category | | ||
| GET | [get_crypto](#lunchable.LunchMoney.get_crypto) | Get Crypto Assets | | ||
| GET | [get_plaid_accounts](#lunchable.LunchMoney.get_plaid_accounts) | Get Plaid Synced Assets | | ||
| GET | [get_recurring_expenses](#lunchable.LunchMoney.get_recurring_expenses) | Get Recurring Expenses | | ||
| GET | [get_tags](#lunchable.LunchMoney.get_tags) | Get Spending Tags | | ||
| GET | [get_transaction](#lunchable.LunchMoney.get_transaction) | Get a Transaction by ID | | ||
| GET | [get_transactions](#lunchable.LunchMoney.get_transactions) | Get Transactions Using Criteria | | ||
| GET | [get_user](#lunchable.LunchMoney.get_user) | Get Personal User Details | | ||
| POST | [insert_asset](#lunchable.LunchMoney.insert_asset) | Create a single (manually-managed) asset | | ||
| POST | [insert_category](#lunchable.LunchMoney.insert_category) | Create a Spending Category | | ||
| POST | [insert_category_group](#lunchable.LunchMoney.insert_category_group) | Create a Spending Category Group | | ||
| POST | [insert_into_category_group](#lunchable.LunchMoney.insert_into_category_group) | Add to a Category Group | | ||
| POST | [insert_transaction_group](#lunchable.LunchMoney.insert_transaction_group) | Create a Transaction Group of Two or More Transactions | | ||
| POST | [insert_transactions](#lunchable.LunchMoney.insert_transactions) | Create One or Many Lunch Money Transactions | | ||
| POST | [unsplit_transactions](#lunchable.LunchMoney.unsplit_transactions) | Unsplit Transactions | | ||
| PUT | [upsert_budget](#lunchable.LunchMoney.upsert_budget) | Upsert a Budget for a Category and Date | | ||
| PUT | [update_asset](#lunchable.LunchMoney.update_asset) | Update a Single Asset | | ||
| PUT | [update_category](#lunchable.LunchMoney.update_category) | Update a single category | | ||
| PUT | [update_crypto](#lunchable.LunchMoney.update_crypto) | Update a Manual Crypto Asset | | ||
| PUT | [update_transaction](#lunchable.LunchMoney.update_transaction) | Update a Transaction | | ||
| DELETE | [remove_budget](#lunchable.LunchMoney.remove_budget) | Unset an Existing Budget for a Particular Category in a Particular Month | | ||
| DELETE | [remove_category](#lunchable.LunchMoney.remove_category) | Delete a single category | | ||
| DELETE | [remove_category_force](#lunchable.LunchMoney.remove_category_force) | Forcefully delete a single category | | ||
| DELETE | [remove_transaction_group](#lunchable.LunchMoney.remove_transaction_group) | Delete a Transaction Group | | ||
|
||
## Low Level Methods | ||
|
||
| Name | Description | | ||
|------------------------------------------------------------|-------------------------------------------------------| | ||
| [request](#lunchable.LunchMoney.request) | Make an HTTP request | | ||
| [arequest](#lunchable.LunchMoney.arequest) | Make an async HTTP request | | ||
| [process_response](#lunchable.LunchMoney.process_response) | Process a Lunch Money response and raise any errors | | ||
| [make_request](#lunchable.LunchMoney.make_request) | Make an HTTP request and `process` its response | | ||
| [amake_request](#lunchable.LunchMoney.amake_request) | Make an async HTTP request and `process` its response | | ||
|
||
## Attributes | ||
|
||
| Name | Description | | ||
|------------------------------------------------------|----------------------------------| | ||
| [async_session](#lunchable.LunchMoney.async_session) | Authenticated Async HTTPX Client | | ||
| [session](#lunchable.LunchMoney.session) | Authenticated HTTPX Client | | ||
|
||
## Class Documentation | ||
|
||
::: lunchable.LunchMoney | ||
handler: python | ||
options: | ||
show_bases: false | ||
allow_inspection: true | ||
inherited_members: true | ||
group_by_category: true | ||
heading_level: 3 | ||
show_source: false |
Oops, something went wrong.