tariochbctools 1.2.3__tar.gz → 1.3.0__tar.gz

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.
Files changed (96) hide show
  1. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/PKG-INFO +1 -1
  2. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/docs/importers.rst +1 -1
  3. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/nordigen/importer.py +2 -2
  4. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/nordigen/nordigen_config.py +50 -6
  5. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools.egg-info/PKG-INFO +1 -1
  6. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/.coveragerc +0 -0
  7. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/.isort.cfg +0 -0
  8. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/.pre-commit-config.yaml +0 -0
  9. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/.readthedocs.yml +0 -0
  10. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/LICENSE.txt +0 -0
  11. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/MANIFEST.in +0 -0
  12. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/README.rst +0 -0
  13. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/docs/_static/.gitignore +0 -0
  14. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/docs/conf.py +0 -0
  15. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/docs/index.rst +0 -0
  16. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/docs/installation.rst +0 -0
  17. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/docs/license.rst +0 -0
  18. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/docs/plugins.rst +0 -0
  19. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/docs/price_fetchers.rst +0 -0
  20. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/docs/requirements.txt +0 -0
  21. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/pyproject.toml +0 -0
  22. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/setup.cfg +0 -0
  23. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/setup.py +0 -0
  24. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/__init__.py +0 -0
  25. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/__init__.py +0 -0
  26. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/bcge/__init__.py +0 -0
  27. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/bcge/importer.py +0 -0
  28. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/bitst/__init__.py +0 -0
  29. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/bitst/importer.py +0 -0
  30. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/blockchain/__init__.py +0 -0
  31. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/blockchain/importer.py +0 -0
  32. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/cembrastatement/__init__.py +0 -0
  33. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/cembrastatement/importer.py +0 -0
  34. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/general/__init__.py +0 -0
  35. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/general/deduplication.py +0 -0
  36. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/general/mailAdapterImporter.py +0 -0
  37. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/general/mt940importer.py +0 -0
  38. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/general/priceLookup.py +0 -0
  39. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/ibkr/__init__.py +0 -0
  40. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/ibkr/importer.py +0 -0
  41. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/neon/__init__.py +0 -0
  42. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/neon/importer.py +0 -0
  43. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/netbenefits/__init__.py +0 -0
  44. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/netbenefits/importer.py +0 -0
  45. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/nordigen/__init__.py +0 -0
  46. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/postfinance/__init__.py +0 -0
  47. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/postfinance/importer.py +0 -0
  48. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/quickfile/__init__.py +0 -0
  49. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/quickfile/importer.py +0 -0
  50. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/radicant/__init__.py +0 -0
  51. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/radicant/importer.py +0 -0
  52. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/raiffeisench/importer.py +0 -0
  53. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/revolut/__init__.py +0 -0
  54. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/revolut/importer.py +0 -0
  55. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/schedule/__init__.py +0 -0
  56. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/schedule/importer.py +0 -0
  57. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/swisscard/__init__.py +0 -0
  58. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/swisscard/importer.py +0 -0
  59. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/transferwise/__init__.py +0 -0
  60. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/transferwise/importer.py +0 -0
  61. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/truelayer/__init__.py +0 -0
  62. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/truelayer/importer.py +0 -0
  63. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/viseca/__init__.py +0 -0
  64. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/viseca/importer.py +0 -0
  65. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/zak/__init__.py +0 -0
  66. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/zak/importer.py +0 -0
  67. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/zkb/__init__.py +0 -0
  68. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/importers/zkb/importer.py +0 -0
  69. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/plugins/__init__.py +0 -0
  70. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/plugins/check_portfolio_sum.py +0 -0
  71. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/plugins/generate_base_ccy_prices.py +0 -0
  72. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/plugins/prices/__init__.py +0 -0
  73. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools/plugins/prices/ibkr.py +0 -0
  74. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools.egg-info/SOURCES.txt +0 -0
  75. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools.egg-info/dependency_links.txt +0 -0
  76. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools.egg-info/entry_points.txt +0 -0
  77. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools.egg-info/not-zip-safe +0 -0
  78. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools.egg-info/requires.txt +0 -0
  79. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/src/tariochbctools.egg-info/top_level.txt +0 -0
  80. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/__init__.py +0 -0
  81. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/conftest.py +0 -0
  82. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/tariochbctools/__init__.py +0 -0
  83. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/tariochbctools/importers/__init__.py +0 -0
  84. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/tariochbctools/importers/test_quickfile.py +0 -0
  85. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/tariochbctools/importers/test_truelayer.py +0 -0
  86. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/tariochbctools/plugins/__init__.py +0 -0
  87. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/entry_already_exists_expected.beancount +0 -0
  88. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/entry_already_exists_input.beancount +0 -0
  89. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/issue122_expected.beancount +0 -0
  90. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/issue122_input.beancount +0 -0
  91. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/missing_fx_expected.beancount +0 -0
  92. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/missing_fx_input.beancount +0 -0
  93. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/normal_expected.beancount +0 -0
  94. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/normal_input.beancount +0 -0
  95. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tests/tariochbctools/plugins/test_generate_base_ccy_prices.py +0 -0
  96. {tariochbctools-1.2.3 → tariochbctools-1.3.0}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tariochbctools
3
- Version: 1.2.3
3
+ Version: 1.3.0
4
4
  Summary: Importers, plugins and price fetchers for Beancount
5
5
  Home-page: https://github.com/tarioch/beancounttools/
6
6
  Author: Patrick Ruckstuhl
@@ -182,7 +182,7 @@ all be listed in the end.
182
182
  .. code-block:: console
183
183
 
184
184
  nordigen-conf list_banks --secret_id YOURSECRET_ID --secret_key YOURSECRET_KEY --country DE
185
- nordigen-conf create_link --secret_id YOURSECRET_ID --secret_key YOURSECRET_KEY --bank REVOLUT_REVOGB21 --reference myref
185
+ nordigen-conf create_link --secret_id YOURSECRET_ID --secret_key YOURSECRET_KEY --bank REVOLUT_REVOGB21 --reference myref --max_historical_days 90 --access_valid_for_days 90 --access_scope "[\"balances\", \"details\", \"transactions\"]"
186
186
  nordigen-conf list_accounts --secret_id YOURSECRET_ID --secret_key YOURSECRET_KEY
187
187
  nordigen-conf delete_link --secret_id YOURSECRET_ID --secret_key YOURSECRET_KEY --reference myref
188
188
 
@@ -28,7 +28,7 @@ class Importer(beangulp.Importer):
28
28
  config = yaml.safe_load(f)
29
29
 
30
30
  r = requests.post(
31
- "https://ob.nordigen.com/api/v2/token/new/",
31
+ "https://bankaccountdata.gocardless.com/api/v2/token/new/",
32
32
  data={
33
33
  "secret_id": config["secret_id"],
34
34
  "secret_key": config["secret_key"],
@@ -47,7 +47,7 @@ class Importer(beangulp.Importer):
47
47
  accountId = account["id"]
48
48
  assetAccount = account["asset_account"]
49
49
  r = requests.get(
50
- f"https://ob.nordigen.com/api/v2/accounts/{accountId}/transactions/",
50
+ f"https://bankaccountdata.gocardless.com/api/v2/accounts/{accountId}/transactions/",
51
51
  headers=headers,
52
52
  )
53
53
  try:
@@ -1,5 +1,6 @@
1
1
  import argparse
2
2
  import sys
3
+ from json import JSONDecoder
3
4
  from typing import Any
4
5
 
5
6
  import requests
@@ -41,24 +42,45 @@ def list_bank(token: str, country: str) -> None:
41
42
  print(asp["name"] + ": " + asp["id"]) # noqa: T201
42
43
 
43
44
 
44
- def create_link(token: str, reference: str, bank: str) -> None:
45
+ def create_link(
46
+ token: str,
47
+ reference: str,
48
+ bank: str,
49
+ max_historical_days: str,
50
+ access_valid_for_days: str,
51
+ access_scope: str,
52
+ ) -> None:
45
53
  if not bank:
46
54
  raise Exception("Please specify --bank it is required for create_link")
47
55
  requisitionId = _find_requisition_id(token, reference)
48
56
  if requisitionId:
49
57
  print(f"Link for for reference {reference} already exists.") # noqa: T201
50
58
  else:
51
- r = requests.post(
59
+ decoder = JSONDecoder()
60
+ r1 = requests.post(
61
+ "https://bankaccountdata.gocardless.com/api/v2/agreements/enduser/",
62
+ data={
63
+ "institution_id": bank,
64
+ "max_historical_days": max_historical_days,
65
+ "access_valid_for_days": access_valid_for_days,
66
+ "access_scope": decoder.decode(access_scope),
67
+ },
68
+ headers=build_header(token),
69
+ )
70
+ check_result(r1)
71
+ agreement_id = r1.json()["id"]
72
+ r2 = requests.post(
52
73
  "https://bankaccountdata.gocardless.com/api/v2/requisitions/",
53
74
  data={
54
75
  "redirect": "http://localhost",
76
+ "agreement": agreement_id,
55
77
  "institution_id": bank,
56
78
  "reference": reference,
57
79
  },
58
80
  headers=build_header(token),
59
81
  )
60
- check_result(r)
61
- link = r.json()["link"]
82
+ check_result(r2)
83
+ link = r2.json()["link"]
62
84
  print(f"Go to {link} for connecting to your bank.") # noqa: T201
63
85
 
64
86
 
@@ -137,12 +159,27 @@ def parse_args(args: Any) -> Any:
137
159
  parser.add_argument(
138
160
  "--reference",
139
161
  default="beancount",
140
- help="reference for add_bank and delete_bank, needs to be unique",
162
+ help="reference for create_link and delete_link, needs to be unique",
141
163
  )
142
164
  parser.add_argument(
143
165
  "--bank",
144
166
  help="Bank to connect to, see list_banks",
145
167
  )
168
+ parser.add_argument(
169
+ "--max_historical_days",
170
+ default="90",
171
+ help="the length of the transaction history to be retrieved",
172
+ )
173
+ parser.add_argument(
174
+ "--access_valid_for_days",
175
+ default="90",
176
+ help="the length of days while the access to account is valid, must be > 0 and <= 90",
177
+ )
178
+ parser.add_argument(
179
+ "--access_scope",
180
+ default='["balances", "details", "transactions"]',
181
+ help="the scope of information",
182
+ )
146
183
  parser.add_argument(
147
184
  "mode",
148
185
  choices=[
@@ -163,7 +200,14 @@ def main(args: Any) -> None:
163
200
  if args.mode == "list_banks":
164
201
  list_bank(token, args.country)
165
202
  elif args.mode == "create_link":
166
- create_link(token, args.reference, args.bank)
203
+ create_link(
204
+ token,
205
+ args.reference,
206
+ args.bank,
207
+ args.max_historical_days,
208
+ args.access_valid_for_days,
209
+ args.access_scope,
210
+ )
167
211
  elif args.mode == "list_accounts":
168
212
  list_accounts(token)
169
213
  elif args.mode == "delete_link":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tariochbctools
3
- Version: 1.2.3
3
+ Version: 1.3.0
4
4
  Summary: Importers, plugins and price fetchers for Beancount
5
5
  Home-page: https://github.com/tarioch/beancounttools/
6
6
  Author: Patrick Ruckstuhl
File without changes
File without changes
File without changes