{"id":13522665,"url":"https://github.com/siddhantgoel/beancount-n26","last_synced_at":"2025-04-10T13:30:51.811Z","repository":{"id":35176075,"uuid":"216653151","full_name":"siddhantgoel/beancount-n26","owner":"siddhantgoel","description":"Beancount Importers for N26 CSV Exports","archived":false,"fork":false,"pushed_at":"2024-04-13T17:30:15.000Z","size":297,"stargazers_count":16,"open_issues_count":1,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-02T02:15:28.915Z","etag":null,"topics":["accounting","banking","beancount","finance","germany","n26","personal-finance","plaintext-accounting","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siddhantgoel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-21T19:51:58.000Z","updated_at":"2024-06-04T14:00:18.949Z","dependencies_parsed_at":"2023-10-11T17:51:22.712Z","dependency_job_id":"c6251a74-7d0b-4053-858e-bbabb0010caf","html_url":"https://github.com/siddhantgoel/beancount-n26","commit_stats":{"total_commits":145,"total_committers":8,"mean_commits":18.125,"dds":0.7172413793103448,"last_synced_commit":"7bef95bedc97f995121bf34d7ecf08090b993278"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siddhantgoel%2Fbeancount-n26","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siddhantgoel%2Fbeancount-n26/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siddhantgoel%2Fbeancount-n26/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siddhantgoel%2Fbeancount-n26/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siddhantgoel","download_url":"https://codeload.github.com/siddhantgoel/beancount-n26/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248225707,"owners_count":21068078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accounting","banking","beancount","finance","germany","n26","personal-finance","plaintext-accounting","python","python3"],"created_at":"2024-08-01T06:00:50.903Z","updated_at":"2025-04-10T13:30:51.787Z","avatar_url":"https://github.com/siddhantgoel.png","language":"Python","funding_links":[],"categories":["Importers"],"sub_categories":["Germany"],"readme":"# Beancount N26 Importer\n\n[![image](https://github.com/siddhantgoel/beancount-n26/workflows/beancount-n26/badge.svg)](https://github.com/siddhantgoel/beancount-n26/workflows/beancount-n26/badge.svg)\n[![image](https://img.shields.io/pypi/v/beancount-n26.svg)](https://pypi.python.org/pypi/beancount-n26)\n[![image](https://img.shields.io/pypi/pyversions/beancount-n26.svg)](https://pypi.python.org/pypi/beancount-n26)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n`beancount-n26` provides a [Beancount] Importer for converting CSV exports of\n[N26] account summaries to the Beancount format.\n\n## Installation\n\n```sh\n$ pip install beancount-n26\n```\n\nIn case you prefer installing from the Github repository, please note that `main` is the\ndevelopment branch so `stable` is what you should be installing from.\n\n## Usage\n\n### Beancount 3.x\n\nBeancount 3.x has replaced the `config.py` file based workflow in favor of having a\nscript based workflow, as per the [changes documented here]. The `beangulp` examples\nsuggest using a Python script based on `beangulp.Ingest`. Here's an example of how that\nmight work:\n\nAdd an `import.py` script in your project root with the following contents:\n\n```python\nfrom beancount_n26 import N26Importer\nfrom beangulp import Ingest\n\nimporters = (\n    N26Importer(\n        IBAN_NUMBER,\n        'Assets:N26',\n        language='en',\n        file_encoding='utf-8',\n    ),\n)\n\nif __name__ == \"__main__\":\n    ingest = Ingest(importer)\n    ingest()\n```\n\n... and run it directly using `python import.py extract`.\n\n### Beancount 2.x\n\nAdd the following to your `config.py`.\n\n```python\nfrom beancount_n26 import N26Importer\n\nCONFIG = [\n    N26Importer(\n        IBAN_NUMBER,\n        'Assets:N26',\n        language='en',\n        file_encoding='utf-8',\n    ),\n]\n```\n\n### Classification\n\nTo classify specific recurring transactions automatically, you can specify an\n`account_patterns` parameter. The key should be the account name and the items in the\nlist are regular expressions that should match a `payee`.\n\nA few helper functions have been provided in\n`beancount_n26/utils/patterns_generation.py` to help you generate this dictionnary.\n\n#### Beancount 3.x\n\n```python\nfrom beancount_n26 import N26Importer\nfrom beangulp import Ingest\n\nimporters = (\n    N26Importer(\n        IBAN_NUMBER,\n        'Assets:N26',\n        account_patterns={\"Expenses:Supermarket\": [\"REWE\", \"ALDI\"]}\n    ),\n)\n\nif __name__ == \"__main__\":\n    ingest = Ingest(importer)\n    ingest()\n```\n\n#### Beancount 2.x\n\n```python\nfrom beancount_n26 import N26Importer\n\nCONFIG = [\n    N26Importer(\n        ...\n        account_patterns={\"Expenses:Supermarket\": [\"REWE\", \"ALDI\"]}\n    ),\n]\n```\n\n## Contributing\n\nPlease make sure you have Python 3.9+ and [Poetry] installed.\n\n1. Git clone the repository -\n   `git clone https://github.com/siddhantgoel/beancount-n26`\n\n2. Install the packages required for development -\n   `poetry install`\n\n3. That's basically it. You should now be able to run the test suite -\n   `poetry run task test`.\n\n[Beancount]: http://furius.ca/beancount/\n[N26]: https://n26.com/\n[Poetry]: https://python-poetry.org/\n[changes documented here]: https://docs.google.com/document/d/1O42HgYQBQEna6YpobTqszSgTGnbRX7RdjmzR2xumfjs/edit#heading=h.hjzt0c6v8pfs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiddhantgoel%2Fbeancount-n26","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiddhantgoel%2Fbeancount-n26","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiddhantgoel%2Fbeancount-n26/lists"}