leggen


Nameleggen JSON
Version 0.6.7 PyPI version JSON
download
home_pagehttps://github.com/elisiariocouto/leggen
SummaryAn Open Banking CLI
upload_time2024-09-15 14:53:44
maintainerNone
docs_urlNone
authorElisiário Couto
requires_python<4.0,>=3.12
licenseMIT
keywords openbanking cli psd2 gocardless mongodb bank transactions finance
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 💲 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
  - [GoCardless Open Banking API](https://developer.gocardless.com/bank-account-data/overview): for connecting to banks

  ### 📦 Storage
  - [SQLite](https://www.sqlite.org): for storing transactions, simple and easy to use
  - [MongoDB](https://www.mongodb.com/docs/): alternative store for transactions, good balance between performance and query capabilities

  ### ⏰ Scheduling
  - [Ofelia](https://github.com/mcuadros/ofelia): for scheduling regular syncs with the database when using Docker

  ### 📊 Visualization
  - [NocoDB](https://github.com/nocodb/nocodb): for visualizing and querying transactions, a simple and easy to use interface for SQLite

## ✨ Features
  - Connect to banks using GoCardless Open Banking API
  - List all connected banks and their statuses
  - List balances of all connected accounts
  - List transactions for all connected accounts
  - Sync all transactions with a SQLite and/or MongoDB database
  - Visualize and query transactions using NocoDB
  - Schedule regular syncs with the database using Ofelia
  - Send notifications to Discord and/or Telegram when transactions match certain filters

## 🚀 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](compose.yml). Open the file and adapt it to your needs.

### Example Configuration

Create a configuration file at with the following content:

```toml
[gocardless]
key = "your-api-key"
secret = "your-secret-key"
url = "https://bankaccountdata.gocardless.com/api/v2"

[database]
sqlite = true
mongodb = true

[database.mongodb]
uri = "mongodb://localhost:27017"

[notifications.discord]
webhook = "https://discord.com/api/webhooks/..."

[notifications.telegram]
# See gist for telegram instructions
# https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a
token = "12345:abcdefghijklmnopqrstuvxwyz"
chat-id = 12345

[filters.case-insensitive]
filter1 = "company-name"
```

### Running Leggen with Docker

After adapting the compose file, run the following command:

```bash
$ docker compose up -d
```

The leggen container will exit, this is expected since you didn't connect any bank accounts yet.

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.
  -c, --config FILE  Path to TOML configuration file
                      [env var: LEGGEN_CONFIG_FILE;
                       default: ~/.config/leggen/config.toml]
  -h, --help         Show this message and exit.

Command Groups:
  bank  Manage banks connections

Commands:
  balances      List balances of all connected accounts
  status        List all connected banks and their status
  sync          Sync all transactions with database
  transactions  List transactions
```

## ⚠️ 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": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "openbanking, cli, psd2, gocardless, mongodb, bank, transactions, finance",
    "author": "Elisi\u00e1rio Couto",
    "author_email": "elisiario@couto.io",
    "download_url": null,
    "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  - [GoCardless Open Banking API](https://developer.gocardless.com/bank-account-data/overview): for connecting to banks\n\n  ### \ud83d\udce6 Storage\n  - [SQLite](https://www.sqlite.org): for storing transactions, simple and easy to use\n  - [MongoDB](https://www.mongodb.com/docs/): alternative store for transactions, good balance between performance and query capabilities\n\n  ### \u23f0 Scheduling\n  - [Ofelia](https://github.com/mcuadros/ofelia): for scheduling regular syncs with the database when using Docker\n\n  ### \ud83d\udcca Visualization\n  - [NocoDB](https://github.com/nocodb/nocodb): for visualizing and querying transactions, a simple and easy to use interface for SQLite\n\n## \u2728 Features\n  - Connect to banks using GoCardless Open Banking API\n  - List all connected banks and their statuses\n  - List balances of all connected accounts\n  - List transactions for all connected accounts\n  - Sync all transactions with a SQLite and/or MongoDB database\n  - Visualize and query transactions using NocoDB\n  - Schedule regular syncs with the database using Ofelia\n  - Send notifications to Discord and/or Telegram when transactions match certain filters\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](compose.yml). Open the file and adapt it to your needs.\n\n### Example Configuration\n\nCreate a configuration file at with the following content:\n\n```toml\n[gocardless]\nkey = \"your-api-key\"\nsecret = \"your-secret-key\"\nurl = \"https://bankaccountdata.gocardless.com/api/v2\"\n\n[database]\nsqlite = true\nmongodb = true\n\n[database.mongodb]\nuri = \"mongodb://localhost:27017\"\n\n[notifications.discord]\nwebhook = \"https://discord.com/api/webhooks/...\"\n\n[notifications.telegram]\n# See gist for telegram instructions\n# https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a\ntoken = \"12345:abcdefghijklmnopqrstuvxwyz\"\nchat-id = 12345\n\n[filters.case-insensitive]\nfilter1 = \"company-name\"\n```\n\n### Running Leggen with Docker\n\nAfter adapting the compose file, run the following command:\n\n```bash\n$ docker compose up -d\n```\n\nThe leggen container will exit, this is expected since you didn't connect any bank accounts yet.\n\nRun 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  -c, --config FILE  Path to TOML configuration file\n                      [env var: LEGGEN_CONFIG_FILE;\n                       default: ~/.config/leggen/config.toml]\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  status        List all connected banks and their status\n  sync          Sync all transactions with database\n  transactions  List transactions\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.6.7",
    "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": "564e48a1255c747d010dafbe1ffd916e082f826f95ccb492580265dd3be9fd8e",
                "md5": "dc2ce6a338512653d9698badbcd613af",
                "sha256": "48b0261513722f106a48547a029e3a0150dce4a30fa50208291bc3347c12280e"
            },
            "downloads": -1,
            "filename": "leggen-0.6.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dc2ce6a338512653d9698badbcd613af",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 19323,
            "upload_time": "2024-09-15T14:53:44",
            "upload_time_iso_8601": "2024-09-15T14:53:44.017106Z",
            "url": "https://files.pythonhosted.org/packages/56/4e/48a1255c747d010dafbe1ffd916e082f826f95ccb492580265dd3be9fd8e/leggen-0.6.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-15 14:53:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "elisiariocouto",
    "github_project": "leggen",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "leggen"
}
        
Elapsed time: 1.76881s