Skip to main content

No project description provided

Project description

beancount-gocardless

This package provides a basic client for interacting with the GoCardless API (formerly Nordigen) and importing your data into Beancount.

This project was inspired by https://github.com/tarioch/beancounttools

Full documentation available at https://beancount-gocardless.readthedocs.io/en/latest/

Key Features:

  • GoCardless API Client: A client for interacting with the GoCardless API. The client has built-in caching via requests-cache.

  • GoCardLess CLI: A command-line interface to manage authorization with the GoCardless API:

    • Listing available banks in a specified country (default: GB).
    • Creating a link to a specific bank using its ID.
    • Listing authorized accounts.
    • Deleting an existing link.
    • Uses environment variables (NORDIGEN_SECRET_ID, NORDIGEN_SECRET_KEY) or command-line arguments for API credentials.
  • Beancount Importer: A beangulp.Importer implementation to easily import transactions fetched from the GoCardless API directly into your Beancount ledger.

You'll need to create a GoCardLess account on https://bankaccountdata.gocardless.com/overview/ to get your credentials.

Installation:

pip install beancount-gocardless

Usage

#### nordigen.yaml
secret_id: $NORDIGEN_SECRET_ID
secret_key: $NORDIGEN_SECRET_KEY

cache_options: # by default, no caching if cache_options is not provided
  cache_name: "nordigen"
  backend: "sqlite"
  expire_after: 3600
  old_data_on_error: true

accounts:
    - id: <REDACTED_UUID>
    asset_account: "Assets:Banks:Revolut:Checking"
#### my.import
#!/usr/bin/env python

import beangulp
from beancount_gocardless import NordigenImporter
from smart_importer import apply_hooks, PredictPostings, PredictPayees

importers = [
    apply_hooks(
        NordigenImporter(),
        [
            PredictPostings(),
            PredictPayees(),
        ],
    )
]

if __name__ == "__main__":
    ingest = beangulp.Ingest(importers)
    ingest()

Import your data from Nordigen's API

python my.import extract ./nordigen.yaml --existing ./ledger.bean

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beancount_gocardless-0.1.5.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beancount_gocardless-0.1.5-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file beancount_gocardless-0.1.5.tar.gz.

File metadata

  • Download URL: beancount_gocardless-0.1.5.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.2 Darwin/24.2.0

File hashes

Hashes for beancount_gocardless-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a99eb13aef94f372b353d00e7701b17d35000364243941654524419e7d0dd1ab
MD5 e0849a83282a2c2398dc2113459ea8e1
BLAKE2b-256 cace3c795202a8c227ec3d8b6a4d6ba51904d65e8b6a5ff163a6fe4851ac2c3b

See more details on using hashes here.

File details

Details for the file beancount_gocardless-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for beancount_gocardless-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ff25f10d499f62e3c158a8bab3321bdb91c1b3451a7ff4e3c62a39fc94b0cdf5
MD5 742d51f2706170f8733e6abd5cad8821
BLAKE2b-256 df5849c09c081269388e9cc0102a980a09c1f54aab681f4873f56884bf389fb5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page