beancount-gocardless 0.1.8__py3-none-any.whl → 0.1.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,130 @@
1
+ Metadata-Version: 2.4
2
+ Name: beancount-gocardless
3
+ Version: 0.1.10
4
+ License-Expression: Unlicense
5
+ License-File: LICENSE
6
+ Requires-Python: <4,>=3.12
7
+ Requires-Dist: beancount
8
+ Requires-Dist: beangulp
9
+ Requires-Dist: pre-commit>=4.5.1
10
+ Requires-Dist: pydantic>=2.0.0
11
+ Requires-Dist: pyyaml
12
+ Requires-Dist: requests
13
+ Requires-Dist: requests-cache
14
+ Requires-Dist: rich
15
+ Requires-Dist: textual-dev>=1.7.0
16
+ Requires-Dist: textual>=3.2.0
17
+ Provides-Extra: dev
18
+ Requires-Dist: myst-parser; extra == 'dev'
19
+ Requires-Dist: sphinx; extra == 'dev'
20
+ Requires-Dist: sphinx-rtd-theme; extra == 'dev'
21
+ Provides-Extra: lint
22
+ Requires-Dist: ruff>=0.9.8; extra == 'lint'
23
+ Provides-Extra: test
24
+ Requires-Dist: pytest; extra == 'test'
25
+ Requires-Dist: pytest-asyncio; extra == 'test'
26
+ Description-Content-Type: text/markdown
27
+
28
+ beancount-gocardless
29
+ ====================
30
+
31
+ GoCardless API client with models manually recreated from swagger spec, plus Beancount importer.
32
+
33
+ Inspired by https://github.com/tarioch/beancounttools.
34
+
35
+ Full documentation at https://beancount-gocardless.readthedocs.io/en/latest/.
36
+
37
+ **Key Features:**
38
+
39
+ - **API Client:** Models based on swagger spec. Built-in caching via `requests-cache`.
40
+ - **GoCardLess CLI**\: A command-line interface to manage authorization with the GoCardless API:
41
+
42
+ - Listing available banks in a specified country (default: GB).
43
+ - Creating a link to a specific bank using its ID.
44
+ - Listing authorized accounts.
45
+ - Deleting an existing link.
46
+ - Uses environment variables (`GOCARDLESS_SECRET_ID`, `GOCARDLESS_SECRET_KEY`) or command-line arguments for API credentials.
47
+ - **Beancount Importer:** A `beangulp.Importer` implementation to easily import transactions fetched from the GoCardless API directly into your Beancount ledger.
48
+
49
+ You'll need to create a GoCardLess account on https://bankaccountdata.gocardless.com/overview/ to get your credentials.
50
+
51
+ ## Development
52
+
53
+ ### API Coverage
54
+
55
+ The GoCardless client provides **complete API coverage** with Pydantic models for all endpoints and data structures:
56
+
57
+ **🏦 Core Banking:**
58
+ - **Accounts**: Full account metadata, balances, details, and transactions
59
+ - **Institutions**: Bank/institution information and capabilities
60
+ - **Requisitions**: Bank link management with full lifecycle support
61
+
62
+ **📋 Agreements & Permissions:**
63
+ - **End User Agreements**: Complete agreement lifecycle management
64
+ - **Access Scopes**: Granular permission control
65
+ - **Reconfirmations**: Agreement renewal workflows
66
+
67
+ **🔧 Advanced Features:**
68
+ - **Integrations**: Institution capability discovery
69
+ - **Token Management**: JWT token handling (internal)
70
+ - **Pagination**: Full paginated response support
71
+ - **Error Handling**: Error response models
72
+
73
+ **📊 Rich Data Models:**
74
+ - **Transactions**: Complete transaction details with currency exchange, balances, and metadata
75
+ - **Balances**: Multi-currency balance information with transaction impact
76
+ - **Account Details**: Extensive account information including ownership and addresses
77
+
78
+ Models manually recreated from the swagger spec, providing type-safe access to every API feature.
79
+
80
+ **Installation:**
81
+
82
+ ```bash
83
+ pip install beancount-gocardless
84
+ ```
85
+
86
+ **Usage**
87
+ ```yaml
88
+ #### gocardless.yaml
89
+ secret_id: $GOCARDLESS_SECRET_ID
90
+ secret_key: $GOCARDLESS_SECRET_KEY
91
+
92
+ cache_options: # by default, no caching if cache_options is not provided
93
+ cache_name: "gocardless"
94
+ backend: "sqlite"
95
+ expire_after: 3600
96
+ old_data_on_error: true
97
+
98
+ accounts:
99
+ - id: <REDACTED_UUID>
100
+ asset_account: "Assets:Banks:Revolut:Checking"
101
+ transaction_types: ["booked", "pending"] # optional, defaults to both
102
+ ```
103
+
104
+ ```python
105
+ #### my.import
106
+ #!/usr/bin/env python
107
+
108
+ import beangulp
109
+ from beancount_gocardless import GoCardLessImporter
110
+ from smart_importer import apply_hooks, PredictPostings, PredictPayees
111
+
112
+ importers = [
113
+ apply_hooks(
114
+ GoCardLessImporter(),
115
+ [
116
+ PredictPostings(),
117
+ PredictPayees(),
118
+ ],
119
+ )
120
+ ]
121
+
122
+ if __name__ == "__main__":
123
+ ingest = beangulp.Ingest(importers)
124
+ ingest()
125
+ ```
126
+
127
+ Import your data from GoCardLess's API
128
+ ```bash
129
+ python my.import extract ./gocardless.yaml --existing ./ledger.bean
130
+ ```
@@ -0,0 +1,12 @@
1
+ beancount_gocardless/__init__.py,sha256=JVJivGs-o5yY8YGqTYwn1cXY7aiA76lUyc95s1Ye-j0,253
2
+ beancount_gocardless/cli.py,sha256=VDtOhhY5wyuxtXokKlbl1RKZteLR919lParyyspE_qk,2850
3
+ beancount_gocardless/client.py,sha256=eBr3VVrnQIFMwRBmoIC8VN9JvtsDhGZge75nYW7Fyns,15402
4
+ beancount_gocardless/importer.py,sha256=4sh66Vmi8eWEXcmkUIq3UJcqjyZNUitZpkp1-ZcNyCU,16688
5
+ beancount_gocardless/models.py,sha256=H6sqkheJUVpmNaB1U5C6EL0j0y1xfiHC-msq5F2uWBk,18283
6
+ beancount_gocardless/tui.py,sha256=fPI60Tu9n44ZBYLjWbdx88EX4i3kp6S4BQ9p5L9Wtjw,30659
7
+ beancount_gocardless/openapi/swagger.json,sha256=t8TLbt0l2UOyorZX8JyoG4XO2qtXDRYUlsllM3ckyG4,264957
8
+ beancount_gocardless-0.1.10.dist-info/METADATA,sha256=htZDSUk8ne4wb33NSzmHGAsXxBG2tlmhu3kVqxZvOLY,4124
9
+ beancount_gocardless-0.1.10.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
10
+ beancount_gocardless-0.1.10.dist-info/entry_points.txt,sha256=_l8n11k9nGPaSDou4atu5NkV0Ojf-qjW2zIIGPzmmgA,128
11
+ beancount_gocardless-0.1.10.dist-info/licenses/LICENSE,sha256=awOCsWJ58m_2kBQwBUGWejVqZm6wuRtCL2hi9rfa0X4,1211
12
+ beancount_gocardless-0.1.10.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.1
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ beancount-gocardless = beancount_gocardless.cli:main
3
+ beancount-gocardless-tui = beancount_gocardless.tui:main
@@ -0,0 +1,24 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <https://unlicense.org>
@@ -1,19 +0,0 @@
1
- Copyright (c) 2018 The Python Packaging Authority
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in all
11
- copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- SOFTWARE.
@@ -1,92 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: beancount-gocardless
3
- Version: 0.1.8
4
- Summary:
5
- License: MIT
6
- Requires-Python: >=3.12
7
- Classifier: License :: OSI Approved :: MIT License
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.12
10
- Classifier: Programming Language :: Python :: 3.13
11
- Requires-Dist: beancount
12
- Requires-Dist: beangulp
13
- Requires-Dist: pyyaml
14
- Requires-Dist: requests
15
- Requires-Dist: requests-cache
16
- Description-Content-Type: text/markdown
17
-
18
- beancount-gocardless
19
- ====================
20
-
21
- This package provides a basic client for interacting with the GoCardless API (formerly Nordigen) and importing your data into Beancount.
22
-
23
- This project was inspired by https://github.com/tarioch/beancounttools
24
-
25
- Full documentation available at https://beancount-gocardless.readthedocs.io/en/latest/
26
-
27
-
28
- **Key Features:**
29
-
30
- - **GoCardless API Client:** A client for interacting with the GoCardless API. The client has built-in caching via `requests-cache`.
31
- - **GoCardLess CLI**\: A command-line interface to manage authorization with the GoCardless API:
32
-
33
- - Listing available banks in a specified country (default: GB).
34
- - Creating a link to a specific bank using its ID.
35
- - Listing authorized accounts.
36
- - Deleting an existing link.
37
- - Uses environment variables (`NORDIGEN_SECRET_ID`, `NORDIGEN_SECRET_KEY`) or command-line arguments for API credentials.
38
- - **Beancount Importer:** A `beangulp.Importer` implementation to easily import transactions fetched from the GoCardless API directly into your Beancount ledger.
39
-
40
- You'll need to create a GoCardLess account on https://bankaccountdata.gocardless.com/overview/ to get your credentials.
41
-
42
- **Installation:**
43
-
44
- ```bash
45
- pip install beancount-gocardless
46
- ```
47
-
48
- **Usage**
49
- ```yaml
50
- #### nordigen.yaml
51
- secret_id: $NORDIGEN_SECRET_ID
52
- secret_key: $NORDIGEN_SECRET_KEY
53
-
54
- cache_options: # by default, no caching if cache_options is not provided
55
- cache_name: "nordigen"
56
- backend: "sqlite"
57
- expire_after: 3600
58
- old_data_on_error: true
59
-
60
- accounts:
61
- - id: <REDACTED_UUID>
62
- asset_account: "Assets:Banks:Revolut:Checking"
63
- ```
64
-
65
- ```python
66
- #### my.import
67
- #!/usr/bin/env python
68
-
69
- import beangulp
70
- from beancount_gocardless import NordigenImporter
71
- from smart_importer import apply_hooks, PredictPostings, PredictPayees
72
-
73
- importers = [
74
- apply_hooks(
75
- NordigenImporter(),
76
- [
77
- PredictPostings(),
78
- PredictPayees(),
79
- ],
80
- )
81
- ]
82
-
83
- if __name__ == "__main__":
84
- ingest = beangulp.Ingest(importers)
85
- ingest()
86
- ```
87
-
88
- Import your data from Nordigen's API
89
- ```bash
90
- python my.import extract ./nordigen.yaml --existing ./ledger.bean
91
- ```
92
-
@@ -1,9 +0,0 @@
1
- beancount_gocardless/__init__.py,sha256=Rf2-pfuaXaXPwBu3yEn2uXyOQ6uLyGxljJ5hoTCss5Y,100
2
- beancount_gocardless/cli.py,sha256=ZdsdknScEOlUq_7rI0ixzN1UDh1dgUokzTzO_3WySqY,2407
3
- beancount_gocardless/client.py,sha256=g2Px7mcM34ibEAVzbxUtCTVrGWO1sm_CmCL-PXySHro,15764
4
- beancount_gocardless/importer.py,sha256=tjNKPCYFddR62YDAXm6rfLqcVNeiGKWbVAEyoPWPekg,11151
5
- beancount_gocardless-0.1.8.dist-info/LICENSE,sha256=7EI8xVBu6h_7_JlVw-yPhhOZlpY9hP8wal7kHtqKT_E,1074
6
- beancount_gocardless-0.1.8.dist-info/METADATA,sha256=-WXcAySDk-rankLsjnn9keWLVrrscByJdwl2n1h1bkw,2634
7
- beancount_gocardless-0.1.8.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
8
- beancount_gocardless-0.1.8.dist-info/entry_points.txt,sha256=fmhiRcNVrum0p30f5YNqvIYVEPXYsS5cP1xNkVmdn8k,70
9
- beancount_gocardless-0.1.8.dist-info/RECORD,,
@@ -1,3 +0,0 @@
1
- [console_scripts]
2
- beancount-gocardless=beancount_gocardless.cli:main
3
-