Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 remove plugins from lunchable #118

Merged
merged 2 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
**lunchable** is a Python Client for the [Lunch Money Developer API](https://lunchmoney.dev). It's
built on top of [pydantic](https://github.com/pydantic/pydantic) and [httpx](https://github.com/encode/httpx/),
it offers an _intuitive_ API, a _simple_ CLI, complete coverage of all endpoints,
and _plugins_ to other external services.
and a _plugin_ framework for extending the functionality of the library.

### Installation

Expand All @@ -46,10 +46,20 @@ first_transaction: TransactionObject = transactions[0]
transaction_as_dict: Dict[str, Any] = first_transaction.model_dump()
```

### CLI

To use the CLI, you'll need to set the `LUNCHMONEY_ACCESS_TOKEN` environment variable.
It's recommended to use [pipx](https://github.com/pypa/pipx) to install the CLI -
use the `lunchable[plugins]` extra to include all the known plugins:

```shell
pipx install "lunchable[plugins]"
```

```shell
export LUNCHMONEY_ACCESS_TOKEN="xxxxxxxxxxx"
lunchable transactions get --limit 5
lunchable http -X GET https://dev.lunchmoney.app/v1/assets
lunchable http -X GET v1/assets
```

<!--skip-->
Expand Down
3 changes: 0 additions & 3 deletions codecov.yaml

This file was deleted.

22 changes: 12 additions & 10 deletions docs/plugins/index.md → docs/plugins.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# Plugins

To install all the known plugins, and their dependencies, install
`lunchable` plugins are Python packages outside of the `lunchable` package that
can be installed into the same environment as `lunchable` to add additional
functionality to the CLI. To install all the known plugins, and their dependencies, install
lunchable with the `plugins` extra:

```shell
pipx install "lunchable[plugins]"
```

lunchable supports CLI plugins with other external packages. See below for what's been built already.
If you can't find what you're looking for, consider building it yourself and opening a pull-request
to add it to the list below:
lunchable supports CLI plugins with other external packages. See below for what's been built
already. If you can't find what you're looking for, consider building it yourself and
opening a pull-request to add it to the list:

- [PushLunch](pushlunch.md): Push Notifications via Pushover
- [SplitLunch](splitlunch.md): Splitwise Integration
- [PrimeLunch](primelunch.md): Amazon Transaction Updater
- [PushLunch](https://github.com/juftin/lunchable-pushlunch): Push Notifications via Pushover
- [SplitLunch](https://github.com/juftin/lunchable-splitlunch): Splitwise Integration
- [PrimeLunch](https://github.com/juftin/lunchable-primelunch): Amazon Transaction Updater

## LunchableApp

Expand All @@ -23,12 +25,12 @@ and more. Notice a few of the main attributes / methods of the `LunchableApp` cl

attribute / method | description | type
------------------------------------------------------------------------------|--------------------------------------------------------------------------------|-------------------------------------------------------
**`lunch`** | The `LunchMoney` client | [LunchMoney](../interacting.md#lunchmoney)
**`lunch`** | The `LunchMoney` client | [LunchMoney](interacting.md#lunchmoney)
**`data`** ¹ | The `LunchableData` object | [LunchableData](#lunchable.plugins.app.LunchableData)
[refresh_data](#lunchable.plugins.LunchableApp.refresh_data) | Refresh all data (besides Transactions) | `method`
[refresh_transactions](#lunchable.plugins.LunchableApp.refresh_transactions) | Refresh transactions, takes same parameters as `LunchMoney.get_transactions()` | `method`
[refresh](#lunchable.plugins.LunchableApp.refresh) ² | Refresh the data for one particular model, takes **kwargs | `method`
[clear_transactions](#lunchable.plugins.LunchableApp.clear_transactions) ³ | Clear all transactions from the internal data | `method`
[clear_transactions](#lunchable.plugins.LunchableApp.clear_transactions) ³ | Clear all transactions from the internal data | `method`

> ¹ This attribute contains all of the data that is loaded from LunchMoney. It has attributes
> for `assets`, `categories`, `plaid_accounts`, `tags`, `transactions`, `crypto` and `user`.
Expand All @@ -37,7 +39,7 @@ and more. Notice a few of the main attributes / methods of the `LunchableApp` cl

> ² This method refreshes all of the data for one particular model. For example,
> `refresh(AssetsObject)` will refresh the assets on the underling `data.assets`
> attribute and return a `dict[int, AssetsObject]` object.
> attribute and return a `dict[int, AssetsObject]` object.

> ³ This the same as running `app.data.transactions.clear()`

Expand Down
109 changes: 0 additions & 109 deletions docs/plugins/primelunch.md

This file was deleted.

51 changes: 0 additions & 51 deletions docs/plugins/pushlunch.md

This file was deleted.

114 changes: 0 additions & 114 deletions docs/plugins/splitlunch.md

This file was deleted.

2 changes: 1 addition & 1 deletion lunchable/_config/api_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get_access_token(access_token: Optional[str] = None) -> str:
str
"""
if access_token is None:
logger.info(
logger.debug(
"Loading Lunch Money Developer API Access token from environment"
)
access_token = getenv(APIConfig._access_token_environment_variable, None)
Expand Down
Loading