tap-belvo 0.0.1b5__py3-none-any.whl → 0.0.1b7__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.

Potentially problematic release.


This version of tap-belvo might be problematic. Click here for more details.

@@ -8,10 +8,10 @@ import sys
8
8
  from functools import lru_cache
9
9
  from typing import Any
10
10
 
11
- if sys.version_info >= (3, 9):
12
- import importlib.resources as importlib_resources
11
+ if sys.version_info < (3, 9):
12
+ import importlib_resources as resources
13
13
  else:
14
- import importlib_resources
14
+ from importlib import resources
15
15
 
16
16
  logger = logging.getLogger(__name__)
17
17
 
@@ -25,5 +25,5 @@ def load_openapi() -> dict[str, Any]:
25
25
  """
26
26
  logger.info("Loading OpenAPI spec from package")
27
27
  filename = "BelvoOpenFinanceApiSpec.json"
28
- with importlib_resources.files(__package__).joinpath(filename).open() as f:
29
- return json.load(f)
28
+ with resources.files(__package__).joinpath(filename).open() as f:
29
+ return json.load(f) # type: ignore[no-any-return]
@@ -16,7 +16,7 @@ class Accounts(BelvoStream):
16
16
 
17
17
  name = "banking_accounts"
18
18
  path = "/api/accounts"
19
- primary_keys = ["id"]
19
+ primary_keys = ("id",)
20
20
  replication_key = "created_at"
21
21
  openapi_ref = "Account"
22
22
 
@@ -26,14 +26,14 @@ class Transactions(BelvoStream):
26
26
 
27
27
  name = "banking_transactions"
28
28
  path = "/api/transactions"
29
- primary_keys = ["id"]
29
+ primary_keys = ("id",)
30
30
  replication_key = "created_at"
31
31
  openapi_ref = "Account"
32
32
  parent_stream_type = Links
33
33
 
34
34
  def get_url_params(
35
35
  self,
36
- context: dict | None,
36
+ context: dict[Any, Any] | None,
37
37
  next_page_token: ParseResult | None,
38
38
  ) -> dict[str, Any]:
39
39
  """Get URL query parameters.
@@ -54,11 +54,11 @@ class Transactions(BelvoStream):
54
54
 
55
55
 
56
56
  class Balances(BelvoStream):
57
- """Balances stream."""
57
+ """DEPRECATED. Balances stream."""
58
58
 
59
59
  name = "banking_balances"
60
60
  path = "/api/balances"
61
- primary_keys = ["id"]
61
+ primary_keys = ("id",)
62
62
  replication_key = "value_date"
63
63
  openapi_ref = "Balance"
64
64
 
@@ -68,7 +68,7 @@ class Owners(BelvoStream):
68
68
 
69
69
  name = "banking_owners"
70
70
  path = "/api/owners"
71
- primary_keys = ["id"]
71
+ primary_keys = ("id",)
72
72
  replication_key = "created_at"
73
73
  openapi_ref = "Owner"
74
74
 
@@ -78,7 +78,7 @@ class InvestmentPortfolios(BelvoStream):
78
78
 
79
79
  name = "investment_portfolios"
80
80
  path = "/investments/portfolios"
81
- primary_keys = ["id"]
81
+ primary_keys = ("id",)
82
82
  replication_key = None
83
83
  openapi_ref = "InvestmentsPortfolio"
84
84
 
@@ -88,7 +88,7 @@ class InvestmentTransactions(BelvoStream):
88
88
 
89
89
  name = "investment_transactions"
90
90
  path = "/investments/transactions"
91
- primary_keys = ["id"]
91
+ primary_keys = ("id",)
92
92
  replication_key = "created_at"
93
93
  openapi_ref = "InvestmentsInstrumentTransaction"
94
94
 
@@ -98,6 +98,6 @@ class ReceivableTransactions(BelvoStream):
98
98
 
99
99
  name = "receivable_transactions"
100
100
  path = "/receivables/transactions"
101
- primary_keys = ["id"]
101
+ primary_keys = ("id",)
102
102
  replication_key = "created_at"
103
103
  openapi_ref = "ReceivablesTransaction"
@@ -10,7 +10,7 @@ class Incomes(BelvoStream):
10
10
 
11
11
  name = "enrichment_incomes"
12
12
  path = "/api/incomes"
13
- primary_keys = ["id"]
13
+ primary_keys = ("id",)
14
14
  openapi_ref = "Income"
15
15
 
16
16
 
@@ -19,7 +19,7 @@ class RecurringExpenses(BelvoStream):
19
19
 
20
20
  name = "enrichment_recurring_expenses"
21
21
  path = "/api/recurring-expenses"
22
- primary_keys = ["id"]
22
+ primary_keys = ("id",)
23
23
  replication_key = None
24
24
  openapi_ref = "RecurringExpenses"
25
25
 
@@ -29,6 +29,6 @@ class RiskInsights(BelvoStream):
29
29
 
30
30
  name = "enrichment_risk_insights"
31
31
  path = "/api/risk-insights"
32
- primary_keys = ["id"]
32
+ primary_keys = ("id",)
33
33
  replication_key = None
34
34
  openapi_ref = "RiskInsights"
@@ -10,9 +10,9 @@ class Invoices(BelvoStream):
10
10
 
11
11
  name = "fiscal_invoices"
12
12
  path = "/api/invoices"
13
- primary_keys = ["id"]
13
+ primary_keys = ("id",)
14
14
  replication_key = "created_at"
15
- openapi_ref = "InvoiceWithId"
15
+ openapi_ref = "InvoiceWithIdSat"
16
16
 
17
17
 
18
18
  class TaxComplianceStatuses(BelvoStream):
@@ -20,7 +20,7 @@ class TaxComplianceStatuses(BelvoStream):
20
20
 
21
21
  name = "fiscal_tax_compliance_statuses"
22
22
  path = "/api/tax-compliance-status"
23
- primary_keys = ["id"]
23
+ primary_keys = ("id",)
24
24
  replication_key = "created_at"
25
25
  openapi_ref = "TaxComplianceStatus"
26
26
 
@@ -31,7 +31,7 @@ class TaxDeclarations(BelvoStream):
31
31
 
32
32
  name = "fiscal_tax_declarations"
33
33
  path = "/api/tax-declarations"
34
- primary_keys = ["id"]
34
+ primary_keys = ("id",)
35
35
  replication_key = "created_at"
36
36
  openapi_ref = "TaxDeclaration"
37
37
 
@@ -41,7 +41,7 @@ class TaxRetentions(BelvoStream):
41
41
 
42
42
  name = "fiscal_tax_retentions"
43
43
  path = "/api/tax-retentions"
44
- primary_keys = ["id"]
44
+ primary_keys = ("id",)
45
45
  replication_key = "created_at"
46
46
  openapi_ref = "TaxRetentions"
47
47
 
@@ -51,7 +51,7 @@ class TaxReturns(BelvoStream):
51
51
 
52
52
  name = "fiscal_tax_returns"
53
53
  path = "/api/tax-returns"
54
- primary_keys = ["id"]
54
+ primary_keys = ("id",)
55
55
  replication_key = "created_at"
56
56
  openapi_ref = "TaxReturn"
57
57
 
@@ -61,6 +61,6 @@ class TaxStatuses(BelvoStream):
61
61
 
62
62
  name = "fiscal_tax_statuses"
63
63
  path = "/api/tax-status"
64
- primary_keys = ["id"]
64
+ primary_keys = ("id",)
65
65
  replication_key = "created_at"
66
- openapi_ref = "TaxStatus"
66
+ openapi_ref = "TaxStatusSat"
@@ -2,6 +2,8 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ import typing as t
6
+
5
7
  from tap_belvo.client import BelvoStream
6
8
 
7
9
 
@@ -10,15 +12,15 @@ class Links(BelvoStream):
10
12
 
11
13
  name = "links_links"
12
14
  path = "/api/links"
13
- primary_keys = ["id"]
15
+ primary_keys = ("id",)
14
16
  replication_key = "created_at"
15
17
  openapi_ref = "Link"
16
18
 
17
19
  def get_child_context(
18
20
  self,
19
- record: dict,
20
- context: dict | None, # noqa: ARG002
21
- ) -> dict:
21
+ record: dict[str, t.Any],
22
+ context: dict[t.Any, t.Any] | None, # noqa: ARG002
23
+ ) -> dict[t.Any, t.Any]:
22
24
  """Return the child context.
23
25
 
24
26
  Args:
@@ -36,6 +38,6 @@ class Institutions(BelvoStream):
36
38
 
37
39
  name = "links_institutions"
38
40
  path = "/api/institutions"
39
- primary_keys = ["id"]
41
+ primary_keys = ("id",)
40
42
  replication_key = None
41
43
  openapi_ref = "Institution"
tap_belvo/tap.py CHANGED
@@ -54,7 +54,6 @@ class TapBelvo(Tap):
54
54
  links.Institutions(self),
55
55
  banking.Accounts(self),
56
56
  banking.Transactions(self),
57
- banking.Balances(self),
58
57
  banking.Owners(self),
59
58
  # banking.InvestmentPortfolios(self), # noqa: ERA001
60
59
  # banking.ReceivableTransactions(self), # noqa: ERA001
@@ -1,23 +1,33 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: tap-belvo
3
- Version: 0.0.1b5
3
+ Version: 0.0.1b7
4
4
  Summary: `tap-belvo` is a Singer tap for Belvo, built with the Meltano SDK for Singer Taps.
5
- Home-page: https://github.com/edgarrmondragon/tap-belvo
6
- License: Apache 2.0
7
- Keywords: ELT,singer.io,Belvo
8
- Author: Edgar Ramírez-Mondragón
9
- Author-email: edgarrm358@gmail.com
10
- Requires-Python: >=3.7.1,<3.12
11
- Classifier: License :: Other/Proprietary License
12
- Classifier: Programming Language :: Python :: 3
5
+ Project-URL: Documentation, https://github.com/edgarrmondragon/tap-belvo#readme
6
+ Project-URL: Homepage, https://github.com/edgarrmondragon/tap-belvo
7
+ Project-URL: Source, https://github.com/edgarrmondragon/tap-belvo
8
+ Author-email: Edgar Ramírez-Mondragón <edgarrm358@gmail.com>
9
+ Maintainer-email: Edgar Ramírez-Mondragón <edgarrm358@gmail.com>
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ Keywords: Belvo,ELT,singer.io
13
+ Classifier: Programming Language :: Python :: 3 :: Only
13
14
  Classifier: Programming Language :: Python :: 3.8
14
15
  Classifier: Programming Language :: Python :: 3.9
15
16
  Classifier: Programming Language :: Python :: 3.10
16
17
  Classifier: Programming Language :: Python :: 3.11
17
- Requires-Dist: requests-cache (==1.*)
18
- Requires-Dist: singer-sdk (>=0.28,<0.31)
19
- Project-URL: Documentation, https://github.com/edgarrmondragon/tap-belvo#readme
20
- Project-URL: Repository, https://github.com/edgarrmondragon/tap-belvo
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Requires-Python: >=3.8
20
+ Requires-Dist: importlib-resources; python_version < '3.9'
21
+ Requires-Dist: requests
22
+ Requires-Dist: requests-cache==1.*
23
+ Requires-Dist: singer-sdk~=0.37.0
24
+ Provides-Extra: testing
25
+ Requires-Dist: deptry>=0.12; extra == 'testing'
26
+ Requires-Dist: pytest>=7.4; extra == 'testing'
27
+ Requires-Dist: singer-sdk[testing]~=0.37.0; extra == 'testing'
28
+ Provides-Extra: typing
29
+ Requires-Dist: mypy; extra == 'typing'
30
+ Requires-Dist: types-requests; extra == 'typing'
21
31
  Description-Content-Type: text/markdown
22
32
 
23
33
  # `tap-belvo`
@@ -52,7 +62,7 @@ A full list of supported settings and capabilities is available by running: `tap
52
62
 
53
63
  ### Source Authentication and Authorization
54
64
 
55
- - [ ] `Developer TODO:` If your tap requires special access on the source system, or any special authentication requirements, provide those here.
65
+ See https://developers.belvo.com/reference/authentication-1.
56
66
 
57
67
  ## Usage
58
68
 
@@ -68,27 +78,24 @@ tap-belvo --config CONFIG --discover > ./catalog.json
68
78
 
69
79
  ## Developer Resources
70
80
 
71
- - [ ] `Developer TODO:` As a first step, scan the entire project for the text "`TODO:`" and complete any recommended steps, deleting the "TODO" references once completed.
72
-
73
81
  ### Initialize your Development Environment
74
82
 
75
83
  ```bash
76
- pipx install poetry
77
- poetry install
84
+ pipx install hatch
78
85
  ```
79
86
 
80
87
  ### Create and Run Tests
81
88
 
82
- Create tests within the `tests` subfolder and then run:
89
+ Run integration tests:
83
90
 
84
91
  ```bash
85
- poetry run pytest
92
+ hatch run test:integration
86
93
  ```
87
94
 
88
- You can also test the `tap-belvo` CLI interface directly using `poetry run`:
95
+ You can also test the `tap-belvo` CLI interface directly:
89
96
 
90
97
  ```bash
91
- poetry run tap-belvo --help
98
+ hatch run sync:console -- --about --format=json
92
99
  ```
93
100
 
94
101
  ### Testing with [Meltano](https://www.meltano.com)
@@ -96,30 +103,22 @@ poetry run tap-belvo --help
96
103
  _**Note:** This tap will work in any Singer environment and does not require Meltano.
97
104
  Examples here are for convenience and to streamline end-to-end orchestration scenarios._
98
105
 
99
- Your project comes with a custom `meltano.yml` project file already created. Open the `meltano.yml` and follow any _"TODO"_ items listed in
100
- the file.
101
-
102
- Next, install Meltano (if you haven't already) and any needed plugins:
106
+ Your project comes with a custom `meltano.yml` project file already created. Go ahead and [install Meltano](https://docs.meltano.com/getting-started/installation/) if you haven't already.
103
107
 
104
- ```bash
105
- # Install meltano
106
- pipx install meltano
107
- # Initialize meltano within this directory
108
- cd tap-belvo
109
- meltano install
110
- ```
108
+ 1. Install all plugins
111
109
 
112
- Now you can test and orchestrate using Meltano:
110
+ ```bash
111
+ meltano install
112
+ ```
113
113
 
114
- ```bash
115
- # Test invocation:
116
- meltano invoke tap-belvo --version
117
- # OR run a test `elt` pipeline:
118
- meltano elt tap-belvo target-jsonl
119
- ```
114
+ 1. Check that the extractor is working properly
120
115
 
121
- ### SDK Dev Guide
116
+ ```bash
117
+ meltano invoke tap-belvo --version
118
+ ```
122
119
 
123
- See the [dev guide](https://sdk.meltano.com/en/latest/dev_guide.html) for more instructions on how to use the SDK to
124
- develop your own taps and targets.
120
+ 1. Execute an ELT pipeline
125
121
 
122
+ ```bash
123
+ meltano run tap-belvo target-jsonl
124
+ ```
@@ -0,0 +1,16 @@
1
+ tap_belvo/__init__.py,sha256=iyiBrJmF2aO9lg9B8vvrJlfGSSg0I2JooKI4TOFqbtY,80
2
+ tap_belvo/__main__.py,sha256=J5_xhlTVBRRUlQ62HlFpgvpDXaeYZqEpb1-eEO0rSJg,110
3
+ tap_belvo/client.py,sha256=RF-ZPIjj94hUie5H94LSUirlWqr86TrPGwcq7OPi7P8,5422
4
+ tap_belvo/tap.py,sha256=iDhdp-0HZS93Glb8J5sLG6-XWHkEU2trVht_tZlFHX0,1970
5
+ tap_belvo/openapi/BelvoOpenFinanceApiSpec.json,sha256=YgJHPPsrmOFdFa-K118xvqvB09TZmJdeIHZFsqLXGN4,1287233
6
+ tap_belvo/openapi/__init__.py,sha256=hG9zupkP8FU2f4jPK1Yhqq8gM7d3a9xGgRX9bL6SJ7Y,754
7
+ tap_belvo/streams/__init__.py,sha256=uzQuiKWBkicZ0CuZNDIeg6oyuuEpLXHiDmBUqlNRssU,936
8
+ tap_belvo/streams/banking.py,sha256=qvR1TxUxzu7o8qMnIfdxIDJ1yhDFO9JRpJH8c6nrwU0,2467
9
+ tap_belvo/streams/enrichment.py,sha256=oiyXvkSK2XRcGjcpfbeTW454eyNGhO-eejdEnuHOFYg,761
10
+ tap_belvo/streams/fiscal.py,sha256=P1kM1TN-Im1XCiTipG-OiKTfbgy0uoW_sg_-D7EnJQo,1603
11
+ tap_belvo/streams/links.py,sha256=E1wXfKkYBY2MLn_CjiXjyiRsDwdHz34iV7_2303k4l8,965
12
+ tap_belvo-0.0.1b7.dist-info/METADATA,sha256=H6XRfDnDR9ds57J_SfbOKawuHiHLt1KCJeDLbDiAFbY,3971
13
+ tap_belvo-0.0.1b7.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
14
+ tap_belvo-0.0.1b7.dist-info/entry_points.txt,sha256=mbs2jnK3SrSgW3kjbO1jMZdQkSAKw-JO8SscyYtN_Pg,57
15
+ tap_belvo-0.0.1b7.dist-info/licenses/LICENSE,sha256=hYHcZxy5jb9T_KQO1dQVotQfhWsU2XBotWBg6FIgklM,1068
16
+ tap_belvo-0.0.1b7.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.6.1
2
+ Generator: hatchling 1.24.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ tap-belvo = tap_belvo.tap:TapBelvo.cli
@@ -1,16 +0,0 @@
1
- tap_belvo/__init__.py,sha256=iyiBrJmF2aO9lg9B8vvrJlfGSSg0I2JooKI4TOFqbtY,80
2
- tap_belvo/__main__.py,sha256=J5_xhlTVBRRUlQ62HlFpgvpDXaeYZqEpb1-eEO0rSJg,110
3
- tap_belvo/client.py,sha256=f-R8R_p_MUZM7VN0EOs9v8Ejswv4nCftRDIl2W4IDow,4417
4
- tap_belvo/openapi/BelvoOpenFinanceApiSpec.json,sha256=DakyefE2lwn4Q3KsJGJSG9hNuLbXHKDaqsZKlnq_mQs,1025531
5
- tap_belvo/openapi/__init__.py,sha256=fU67Xg3FfuHxhpPQflqKtFt6SxCv5uOXDeGrmIxkNtM,739
6
- tap_belvo/streams/__init__.py,sha256=uzQuiKWBkicZ0CuZNDIeg6oyuuEpLXHiDmBUqlNRssU,936
7
- tap_belvo/streams/banking.py,sha256=tv57A3D0K720bv-9DkuoJpPyvywv55a-T0tmfCqDC5A,2438
8
- tap_belvo/streams/enrichment.py,sha256=GyxQ-BX_1GJQTwk9TfufLH9CnOJz7ePKl9sSpTyagn4,758
9
- tap_belvo/streams/fiscal.py,sha256=H8gwx6pNMG52cgY9E7YRRg3XnzcVGpdKnT6kD3RrfDQ,1591
10
- tap_belvo/streams/links.py,sha256=Ncy6F3fH_VVTGTPWTocivgdPybMBJkU13jU73xCP5w4,903
11
- tap_belvo/tap.py,sha256=p6u1lZcVeTPVkoS9FP3DqWzj8fR5Z5oOVT2ay3po7dc,2006
12
- tap_belvo-0.0.1b5.dist-info/LICENSE,sha256=hYHcZxy5jb9T_KQO1dQVotQfhWsU2XBotWBg6FIgklM,1068
13
- tap_belvo-0.0.1b5.dist-info/METADATA,sha256=sKt5tzd0U5QBWTvzKlB-Xy_1bY4kB7WX2lp-2CoWtuA,4058
14
- tap_belvo-0.0.1b5.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
15
- tap_belvo-0.0.1b5.dist-info/entry_points.txt,sha256=o-uyTz-qaknsntJM9ZgXLKuuJtAtMKoK27gtngO7ShQ,56
16
- tap_belvo-0.0.1b5.dist-info/RECORD,,
@@ -1,3 +0,0 @@
1
- [console_scripts]
2
- tap-belvo=tap_belvo.tap:TapBelvo.cli
3
-