tariochbctools 0.33.0__tar.gz → 0.35__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 (89) hide show
  1. {tariochbctools-0.33.0/src/tariochbctools.egg-info → tariochbctools-0.35}/PKG-INFO +1 -1
  2. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/nordigen/nordigen_config.py +13 -8
  3. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/transferwise/importer.py +10 -5
  4. {tariochbctools-0.33.0 → tariochbctools-0.35/src/tariochbctools.egg-info}/PKG-INFO +1 -1
  5. {tariochbctools-0.33.0 → tariochbctools-0.35}/.coveragerc +0 -0
  6. {tariochbctools-0.33.0 → tariochbctools-0.35}/.isort.cfg +0 -0
  7. {tariochbctools-0.33.0 → tariochbctools-0.35}/.pre-commit-config.yaml +0 -0
  8. {tariochbctools-0.33.0 → tariochbctools-0.35}/.readthedocs.yml +0 -0
  9. {tariochbctools-0.33.0 → tariochbctools-0.35}/LICENSE.txt +0 -0
  10. {tariochbctools-0.33.0 → tariochbctools-0.35}/MANIFEST.in +0 -0
  11. {tariochbctools-0.33.0 → tariochbctools-0.35}/README.rst +0 -0
  12. {tariochbctools-0.33.0 → tariochbctools-0.35}/docs/_static/.gitignore +0 -0
  13. {tariochbctools-0.33.0 → tariochbctools-0.35}/docs/conf.py +0 -0
  14. {tariochbctools-0.33.0 → tariochbctools-0.35}/docs/importers.rst +0 -0
  15. {tariochbctools-0.33.0 → tariochbctools-0.35}/docs/index.rst +0 -0
  16. {tariochbctools-0.33.0 → tariochbctools-0.35}/docs/installation.rst +0 -0
  17. {tariochbctools-0.33.0 → tariochbctools-0.35}/docs/license.rst +0 -0
  18. {tariochbctools-0.33.0 → tariochbctools-0.35}/docs/plugins.rst +0 -0
  19. {tariochbctools-0.33.0 → tariochbctools-0.35}/docs/price_fetchers.rst +0 -0
  20. {tariochbctools-0.33.0 → tariochbctools-0.35}/docs/requirements.txt +0 -0
  21. {tariochbctools-0.33.0 → tariochbctools-0.35}/pyproject.toml +0 -0
  22. {tariochbctools-0.33.0 → tariochbctools-0.35}/setup.cfg +0 -0
  23. {tariochbctools-0.33.0 → tariochbctools-0.35}/setup.py +0 -0
  24. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/__init__.py +0 -0
  25. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/__init__.py +0 -0
  26. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/bcge/__init__.py +0 -0
  27. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/bcge/importer.py +0 -0
  28. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/bitst/__init__.py +0 -0
  29. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/bitst/importer.py +0 -0
  30. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/blockchain/__init__.py +0 -0
  31. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/blockchain/importer.py +0 -0
  32. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/cembrastatement/__init__.py +0 -0
  33. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/cembrastatement/importer.py +0 -0
  34. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/general/__init__.py +0 -0
  35. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/general/mailAdapterImporter.py +0 -0
  36. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/general/mt940importer.py +0 -0
  37. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/general/priceLookup.py +0 -0
  38. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/ibkr/__init__.py +0 -0
  39. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/ibkr/importer.py +0 -0
  40. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/neon/__init__.py +0 -0
  41. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/neon/importer.py +0 -0
  42. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/nordigen/__init__.py +0 -0
  43. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/nordigen/importer.py +0 -0
  44. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/postfinance/__init__.py +0 -0
  45. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/postfinance/importer.py +0 -0
  46. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/quickfile/__init__.py +0 -0
  47. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/quickfile/importer.py +0 -0
  48. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/raiffeisench/importer.py +0 -0
  49. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/revolut/__init__.py +0 -0
  50. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/revolut/importer.py +0 -0
  51. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/schedule/__init__.py +0 -0
  52. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/schedule/importer.py +0 -0
  53. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/swisscard/__init__.py +0 -0
  54. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/swisscard/importer.py +0 -0
  55. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/transferwise/__init__.py +0 -0
  56. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/truelayer/__init__.py +0 -0
  57. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/truelayer/importer.py +0 -0
  58. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/viseca/__init__.py +0 -0
  59. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/viseca/importer.py +0 -0
  60. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/zak/__init__.py +0 -0
  61. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/zak/importer.py +0 -0
  62. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/zkb/__init__.py +0 -0
  63. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/importers/zkb/importer.py +0 -0
  64. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/plugins/__init__.py +0 -0
  65. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/plugins/check_portfolio_sum.py +0 -0
  66. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/plugins/generate_base_ccy_prices.py +0 -0
  67. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/plugins/prices/__init__.py +0 -0
  68. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools/plugins/prices/ibkr.py +0 -0
  69. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools.egg-info/SOURCES.txt +0 -0
  70. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools.egg-info/dependency_links.txt +0 -0
  71. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools.egg-info/entry_points.txt +0 -0
  72. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools.egg-info/not-zip-safe +0 -0
  73. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools.egg-info/requires.txt +0 -0
  74. {tariochbctools-0.33.0 → tariochbctools-0.35}/src/tariochbctools.egg-info/top_level.txt +0 -0
  75. {tariochbctools-0.33.0 → tariochbctools-0.35}/tests/__init__.py +0 -0
  76. {tariochbctools-0.33.0 → tariochbctools-0.35}/tests/conftest.py +0 -0
  77. {tariochbctools-0.33.0 → tariochbctools-0.35}/tests/tariochbctools/__init__.py +0 -0
  78. {tariochbctools-0.33.0 → tariochbctools-0.35}/tests/tariochbctools/importers/__init__.py +0 -0
  79. {tariochbctools-0.33.0 → tariochbctools-0.35}/tests/tariochbctools/importers/test_quickfile.py +0 -0
  80. {tariochbctools-0.33.0 → tariochbctools-0.35}/tests/tariochbctools/importers/test_truelayer.py +0 -0
  81. {tariochbctools-0.33.0 → tariochbctools-0.35}/tests/tariochbctools/plugins/__init__.py +0 -0
  82. {tariochbctools-0.33.0 → tariochbctools-0.35}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/entry_already_exists_expected.beancount +0 -0
  83. {tariochbctools-0.33.0 → tariochbctools-0.35}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/entry_already_exists_input.beancount +0 -0
  84. {tariochbctools-0.33.0 → tariochbctools-0.35}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/missing_fx_expected.beancount +0 -0
  85. {tariochbctools-0.33.0 → tariochbctools-0.35}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/missing_fx_input.beancount +0 -0
  86. {tariochbctools-0.33.0 → tariochbctools-0.35}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/normal_expected.beancount +0 -0
  87. {tariochbctools-0.33.0 → tariochbctools-0.35}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/normal_input.beancount +0 -0
  88. {tariochbctools-0.33.0 → tariochbctools-0.35}/tests/tariochbctools/plugins/test_generate_base_ccy_prices.py +0 -0
  89. {tariochbctools-0.33.0 → tariochbctools-0.35}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tariochbctools
3
- Version: 0.33.0
3
+ Version: 0.35
4
4
  Summary: Importers, plugins and price fetchers for Beancount
5
5
  Home-page: https://github.com/tarioch/beancounttools/
6
6
  Author: Patrick Ruckstuhl
@@ -17,7 +17,7 @@ def check_result(result):
17
17
 
18
18
  def get_token(secret_id, secret_key):
19
19
  r = requests.post(
20
- "https://ob.nordigen.com/api/v2/token/new/",
20
+ "https://bankaccountdata.gocardless.com/api/v2/token/new/",
21
21
  data={
22
22
  "secret_id": secret_id,
23
23
  "secret_key": secret_key,
@@ -30,7 +30,7 @@ def get_token(secret_id, secret_key):
30
30
 
31
31
  def list_bank(token, country):
32
32
  r = requests.get(
33
- "https://ob.nordigen.com/api/v2/institutions/",
33
+ "https://bankaccountdata.gocardless.com/api/v2/institutions/",
34
34
  params={"country": country},
35
35
  headers=build_header(token),
36
36
  )
@@ -48,7 +48,7 @@ def create_link(token, reference, bank):
48
48
  print(f"Link for for reference {reference} already exists.") # noqa: T201
49
49
  else:
50
50
  r = requests.post(
51
- "https://ob.nordigen.com/api/v2/requisitions/",
51
+ "https://bankaccountdata.gocardless.com/api/v2/requisitions/",
52
52
  data={
53
53
  "redirect": "http://localhost",
54
54
  "institution_id": bank,
@@ -63,7 +63,9 @@ def create_link(token, reference, bank):
63
63
 
64
64
  def list_accounts(token):
65
65
  headers = build_header(token)
66
- r = requests.get("https://ob.nordigen.com/api/v2/requisitions/", headers=headers)
66
+ r = requests.get(
67
+ "https://bankaccountdata.gocardless.com/api/v2/requisitions/", headers=headers
68
+ )
67
69
  print(r.json()) # noqa: T201
68
70
  check_result(r)
69
71
  for req in r.json()["results"]:
@@ -71,7 +73,8 @@ def list_accounts(token):
71
73
  print(f"Reference: {reference}") # noqa: T201
72
74
  for account in req["accounts"]:
73
75
  ra = requests.get(
74
- f"https://ob.nordigen.com/api/v2/accounts/{account}", headers=headers
76
+ f"https://bankaccountdata.gocardless.com/api/v2/accounts/{account}",
77
+ headers=headers,
75
78
  )
76
79
  check_result(ra)
77
80
  acc = ra.json()
@@ -79,7 +82,7 @@ def list_accounts(token):
79
82
  iban = acc["iban"]
80
83
 
81
84
  ra = requests.get(
82
- f"https://ob.nordigen.com/api/v2/accounts/{account}/details",
85
+ f"https://bankaccountdata.gocardless.com/api/v2/accounts/{account}/details",
83
86
  headers=headers,
84
87
  )
85
88
  check_result(ra)
@@ -94,7 +97,7 @@ def delete_link(token, reference):
94
97
  requisitionId = _find_requisition_id(token, reference)
95
98
  if requisitionId:
96
99
  r = requests.delete(
97
- f"https://ob.nordigen.com/api/v2/requisitions/{requisitionId}",
100
+ f"https://bankaccountdata.gocardless.com/api/v2/requisitions/{requisitionId}",
98
101
  headers=build_header(token),
99
102
  )
100
103
  check_result(r)
@@ -102,7 +105,9 @@ def delete_link(token, reference):
102
105
 
103
106
  def _find_requisition_id(token, userId):
104
107
  headers = build_header(token)
105
- r = requests.get("https://ob.nordigen.com/api/v2/requisitions/", headers=headers)
108
+ r = requests.get(
109
+ "https://bankaccountdata.gocardless.com/api/v2/requisitions/", headers=headers
110
+ )
106
111
  check_result(r)
107
112
  for req in r.json()["results"]:
108
113
  if req["reference"] == userId:
@@ -27,8 +27,10 @@ class Importer(importer.ImporterProtocol):
27
27
  return ""
28
28
 
29
29
  def __init__(self, *args, **kwargs):
30
+ if "profileId" in kwargs:
31
+ self.profileId = kwargs.pop("profileId")
30
32
  if "startDate" in kwargs:
31
- self.startDate = kwargs["startDate"]
33
+ self.startDate = kwargs.pop("startDate")
32
34
  else:
33
35
  self.startDate = datetime.combine(
34
36
  date.today() + relativedelta(months=-3),
@@ -36,7 +38,7 @@ class Importer(importer.ImporterProtocol):
36
38
  timezone.utc,
37
39
  ).isoformat()
38
40
  if "endDate" in kwargs:
39
- self.endDate = kwargs["endDate"]
41
+ self.endDate = kwargs.pop("endDate")
40
42
  else:
41
43
  self.endDate = datetime.combine(
42
44
  date.today(), datetime.max.time(), timezone.utc
@@ -121,9 +123,12 @@ class Importer(importer.ImporterProtocol):
121
123
  self.private_key_path = config["privateKeyPath"]
122
124
 
123
125
  headers = {"Authorization": "Bearer " + self.api_token}
124
- r = requests.get("https://api.transferwise.com/v1/profiles", headers=headers)
125
- profiles = r.json()
126
- self.profileId = profiles[0]["id"]
126
+ if not self.profileId:
127
+ r = requests.get(
128
+ "https://api.transferwise.com/v1/profiles", headers=headers
129
+ )
130
+ profiles = r.json()
131
+ self.profileId = profiles[0]["id"]
127
132
 
128
133
  r = requests.get(
129
134
  "https://api.transferwise.com/v1/borderless-accounts",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tariochbctools
3
- Version: 0.33.0
3
+ Version: 0.35
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