# 💲 leggen
An Open Banking CLI.
This tool aims to provide a simple way to connect to banks using the GoCardless Open Banking API.
Having a simple CLI tool to connect to banks and list transactions can be very useful for developers and companies that need to access bank data.
Having your bank data in a database, gives you the power to backup, analyze and create reports with your data.
## 🛠️ Technologies
- Python: for the CLI
- [GoCardless Open Banking API](https://developer.gocardless.com/bank-account-data/overview): for connecting to banks
- [SQLite](https://www.sqlite.org): for storing transactions, simple and easy to use
- [NocoDB](https://github.com/nocodb/nocodb): for visualizing and querying transactions, a simple and easy to use interface for SQLite
- [Ofelia](https://github.com/mcuadros/ofelia): for scheduling regular syncs with the database when using Docker
- [MongoDB](https://www.mongodb.com/docs/): alternative store for transactions, good balance between performance and query capabilities
## ✨ Features
- Connect to banks using GoCardless Open Banking API
- List all connected banks and their status
- List balances of all connected accounts
- List transactions for all connected accounts
- Sync all transactions with a MongoDB database
## 🚀 Installation and Configuration
In order to use `leggen`, you need to create a GoCardless account. GoCardless is a service that provides access to Open Banking APIs. You can create an account at https://gocardless.com/bank-account-data/.
After creating an account and getting your API keys, the best way is to use the [compose file](docker-compose.yml). Open the file and adapt it to your needs. Then run the following command:
```bash
$ docker compose up -d
```
The leggen container will exit, this is expected. Now you can run the following command to create the configuration file:
```bash
$ docker compose run leggen init
```
Now you need to connect your bank accounts. Run the following command and follow the instructions:
```bash
$ docker compose run leggen bank add
```
To sync all transactions with the database, run the following command:
```bash
$ docker compose run leggen sync
```
## 👩🏫 Usage
```
$ leggen --help
Usage: leggen [OPTIONS] COMMAND [ARGS]...
Leggen: An Open Banking CLI
Options:
--version Show the version and exit.
-h, --help Show this message and exit.
Command Groups:
bank Manage banks connections
Commands:
balances List balances of all connected accounts
init Create configuration file
status List all connected banks and their status
sync Sync all transactions with database
transactions List transactions for an account
```
## ⚠️ Caveats
- This project is still in early development, breaking changes may occur.
Raw data
{
"_id": null,
"home_page": "https://github.com/elisiariocouto/leggen",
"name": "leggen",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.12,<4.0",
"maintainer_email": "",
"keywords": "openbanking,cli,psd2,gocardless,mongodb,bank,transactions,finance",
"author": "Elisi\u00e1rio Couto",
"author_email": "elisiario@couto.io",
"download_url": "",
"platform": null,
"description": "# \ud83d\udcb2 leggen\n\nAn Open Banking CLI.\n\nThis tool aims to provide a simple way to connect to banks using the GoCardless Open Banking API.\n\nHaving a simple CLI tool to connect to banks and list transactions can be very useful for developers and companies that need to access bank data.\n\nHaving your bank data in a database, gives you the power to backup, analyze and create reports with your data.\n\n## \ud83d\udee0\ufe0f Technologies\n - Python: for the CLI\n - [GoCardless Open Banking API](https://developer.gocardless.com/bank-account-data/overview): for connecting to banks\n - [SQLite](https://www.sqlite.org): for storing transactions, simple and easy to use\n - [NocoDB](https://github.com/nocodb/nocodb): for visualizing and querying transactions, a simple and easy to use interface for SQLite\n - [Ofelia](https://github.com/mcuadros/ofelia): for scheduling regular syncs with the database when using Docker\n - [MongoDB](https://www.mongodb.com/docs/): alternative store for transactions, good balance between performance and query capabilities\n\n## \u2728 Features\n - Connect to banks using GoCardless Open Banking API\n - List all connected banks and their status\n - List balances of all connected accounts\n - List transactions for all connected accounts\n - Sync all transactions with a MongoDB database\n\n## \ud83d\ude80 Installation and Configuration\n\nIn order to use `leggen`, you need to create a GoCardless account. GoCardless is a service that provides access to Open Banking APIs. You can create an account at https://gocardless.com/bank-account-data/.\n\nAfter creating an account and getting your API keys, the best way is to use the [compose file](docker-compose.yml). Open the file and adapt it to your needs. Then run the following command:\n\n```bash\n$ docker compose up -d\n```\n\nThe leggen container will exit, this is expected. Now you can run the following command to create the configuration file:\n\n```bash\n$ docker compose run leggen init\n```\n\nNow you need to connect your bank accounts. Run the following command and follow the instructions:\n\n```bash\n$ docker compose run leggen bank add\n```\n\nTo sync all transactions with the database, run the following command:\n\n```bash\n$ docker compose run leggen sync\n```\n\n## \ud83d\udc69\u200d\ud83c\udfeb Usage\n\n```\n$ leggen --help\nUsage: leggen [OPTIONS] COMMAND [ARGS]...\n\n Leggen: An Open Banking CLI\n\nOptions:\n --version Show the version and exit.\n -h, --help Show this message and exit.\n\nCommand Groups:\n bank Manage banks connections\n\nCommands:\n balances List balances of all connected accounts\n init Create configuration file\n status List all connected banks and their status\n sync Sync all transactions with database\n transactions List transactions for an account\n```\n\n## \u26a0\ufe0f Caveats\n - This project is still in early development, breaking changes may occur.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An Open Banking CLI",
"version": "0.2.3",
"project_urls": {
"Homepage": "https://github.com/elisiariocouto/leggen",
"Repository": "https://github.com/elisiariocouto/leggen"
},
"split_keywords": [
"openbanking",
"cli",
"psd2",
"gocardless",
"mongodb",
"bank",
"transactions",
"finance"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "05580ec1dcad0a8f5b9493ab438224677bd7d275297f262955733f61469396f7",
"md5": "37ccc6a7e2ec28e653c214d57daf53f8",
"sha256": "5308c3b80d328000e79808cf21d0f37ff97ab6fa15c078d5b87715a6d8ad0b3c"
},
"downloads": -1,
"filename": "leggen-0.2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "37ccc6a7e2ec28e653c214d57daf53f8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12,<4.0",
"size": 14788,
"upload_time": "2024-03-06T18:35:18",
"upload_time_iso_8601": "2024-03-06T18:35:18.754776Z",
"url": "https://files.pythonhosted.org/packages/05/58/0ec1dcad0a8f5b9493ab438224677bd7d275297f262955733f61469396f7/leggen-0.2.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-06 18:35:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "elisiariocouto",
"github_project": "leggen",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "leggen"
}