geldstrom 0.0.1__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 (84) hide show
  1. geldstrom-0.0.1/.gitignore +16 -0
  2. geldstrom-0.0.1/PKG-INFO +30 -0
  3. geldstrom-0.0.1/README.md +7 -0
  4. geldstrom-0.0.1/geldstrom/__init__.py +70 -0
  5. geldstrom-0.0.1/geldstrom/clients/__init__.py +19 -0
  6. geldstrom-0.0.1/geldstrom/clients/base.py +78 -0
  7. geldstrom-0.0.1/geldstrom/clients/fints3.py +490 -0
  8. geldstrom-0.0.1/geldstrom/domain/__init__.py +60 -0
  9. geldstrom-0.0.1/geldstrom/domain/connection/__init__.py +30 -0
  10. geldstrom-0.0.1/geldstrom/domain/connection/challenge.py +254 -0
  11. geldstrom-0.0.1/geldstrom/domain/connection/credentials.py +39 -0
  12. geldstrom-0.0.1/geldstrom/domain/connection/retry.py +32 -0
  13. geldstrom-0.0.1/geldstrom/domain/connection/session.py +91 -0
  14. geldstrom-0.0.1/geldstrom/domain/model/__init__.py +23 -0
  15. geldstrom-0.0.1/geldstrom/domain/model/accounts.py +49 -0
  16. geldstrom-0.0.1/geldstrom/domain/model/balances.py +33 -0
  17. geldstrom-0.0.1/geldstrom/domain/model/bank.py +34 -0
  18. geldstrom-0.0.1/geldstrom/domain/model/payments.py +31 -0
  19. geldstrom-0.0.1/geldstrom/domain/model/tan.py +99 -0
  20. geldstrom-0.0.1/geldstrom/domain/model/transactions.py +29 -0
  21. geldstrom-0.0.1/geldstrom/domain/ports/__init__.py +16 -0
  22. geldstrom-0.0.1/geldstrom/domain/ports/accounts.py +17 -0
  23. geldstrom-0.0.1/geldstrom/domain/ports/balances.py +18 -0
  24. geldstrom-0.0.1/geldstrom/domain/ports/payments.py +17 -0
  25. geldstrom-0.0.1/geldstrom/domain/ports/session.py +23 -0
  26. geldstrom-0.0.1/geldstrom/domain/ports/tan_methods.py +41 -0
  27. geldstrom-0.0.1/geldstrom/domain/ports/transactions.py +22 -0
  28. geldstrom-0.0.1/geldstrom/infrastructure/__init__.py +7 -0
  29. geldstrom-0.0.1/geldstrom/infrastructure/fints/__init__.py +44 -0
  30. geldstrom-0.0.1/geldstrom/infrastructure/fints/adapters/__init__.py +29 -0
  31. geldstrom-0.0.1/geldstrom/infrastructure/fints/adapters/accounts.py +231 -0
  32. geldstrom-0.0.1/geldstrom/infrastructure/fints/adapters/balances.py +201 -0
  33. geldstrom-0.0.1/geldstrom/infrastructure/fints/adapters/connection.py +510 -0
  34. geldstrom-0.0.1/geldstrom/infrastructure/fints/adapters/helpers.py +45 -0
  35. geldstrom-0.0.1/geldstrom/infrastructure/fints/adapters/serialization.py +78 -0
  36. geldstrom-0.0.1/geldstrom/infrastructure/fints/adapters/session.py +104 -0
  37. geldstrom-0.0.1/geldstrom/infrastructure/fints/adapters/tan_methods.py +280 -0
  38. geldstrom-0.0.1/geldstrom/infrastructure/fints/adapters/transactions.py +624 -0
  39. geldstrom-0.0.1/geldstrom/infrastructure/fints/credentials.py +60 -0
  40. geldstrom-0.0.1/geldstrom/infrastructure/fints/debug.py +380 -0
  41. geldstrom-0.0.1/geldstrom/infrastructure/fints/dialog/__init__.py +50 -0
  42. geldstrom-0.0.1/geldstrom/infrastructure/fints/dialog/challenge.py +102 -0
  43. geldstrom-0.0.1/geldstrom/infrastructure/fints/dialog/connection.py +164 -0
  44. geldstrom-0.0.1/geldstrom/infrastructure/fints/dialog/factory.py +775 -0
  45. geldstrom-0.0.1/geldstrom/infrastructure/fints/dialog/logging.py +109 -0
  46. geldstrom-0.0.1/geldstrom/infrastructure/fints/dialog/message.py +100 -0
  47. geldstrom-0.0.1/geldstrom/infrastructure/fints/dialog/responses.py +238 -0
  48. geldstrom-0.0.1/geldstrom/infrastructure/fints/dialog/security.py +251 -0
  49. geldstrom-0.0.1/geldstrom/infrastructure/fints/exceptions.py +90 -0
  50. geldstrom-0.0.1/geldstrom/infrastructure/fints/operations/__init__.py +43 -0
  51. geldstrom-0.0.1/geldstrom/infrastructure/fints/operations/accounts.py +233 -0
  52. geldstrom-0.0.1/geldstrom/infrastructure/fints/operations/balances.py +200 -0
  53. geldstrom-0.0.1/geldstrom/infrastructure/fints/operations/enums.py +23 -0
  54. geldstrom-0.0.1/geldstrom/infrastructure/fints/operations/helpers.py +129 -0
  55. geldstrom-0.0.1/geldstrom/infrastructure/fints/operations/mt940.py +54 -0
  56. geldstrom-0.0.1/geldstrom/infrastructure/fints/operations/pagination.py +150 -0
  57. geldstrom-0.0.1/geldstrom/infrastructure/fints/operations/transactions.py +299 -0
  58. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/__init__.py +516 -0
  59. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/base.py +982 -0
  60. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/formals/__init__.py +220 -0
  61. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/formals/amounts.py +175 -0
  62. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/formals/enums.py +408 -0
  63. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/formals/identifiers.py +282 -0
  64. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/formals/parameters.py +265 -0
  65. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/formals/responses.py +90 -0
  66. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/formals/security.py +272 -0
  67. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/formals/tan.py +198 -0
  68. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/formals/transactions.py +99 -0
  69. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/parameters.py +326 -0
  70. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/parser.py +574 -0
  71. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/segments/__init__.py +350 -0
  72. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/segments/accounts.py +59 -0
  73. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/segments/auth.py +476 -0
  74. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/segments/bank.py +324 -0
  75. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/segments/dialog.py +264 -0
  76. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/segments/message.py +235 -0
  77. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/segments/params.py +423 -0
  78. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/segments/pintan.py +886 -0
  79. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/segments/saldo.py +366 -0
  80. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/segments/transactions.py +323 -0
  81. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/tokenizer.py +149 -0
  82. geldstrom-0.0.1/geldstrom/infrastructure/fints/protocol/types.py +532 -0
  83. geldstrom-0.0.1/geldstrom/infrastructure/fints/session.py +100 -0
  84. geldstrom-0.0.1/pyproject.toml +40 -0
@@ -0,0 +1,16 @@
1
+ __pycache__/
2
+ build/
3
+ dist/
4
+ *.egg-info
5
+ env
6
+ .idea/
7
+ *.pyc
8
+ .ruff_cache/
9
+ .pytest_cache/
10
+ .DS_Store
11
+
12
+ .env
13
+ .venv/
14
+ config/*.env
15
+
16
+ docs/_deprecated/
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: geldstrom
3
+ Version: 0.0.1
4
+ Summary: German banking API client for account data and transactions
5
+ Author-email: Malte Winckler <malte@nichts-ist-einfach.de>
6
+ License-Expression: LGPL-3.0-only
7
+ Keywords: banking,fints,german-banking,hbci,transactions
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Intended Audience :: Other Audience
11
+ Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Requires-Python: >=3.13
15
+ Requires-Dist: bleach<6.0,>=5.0
16
+ Requires-Dist: dotenv<1.0.0,>=0.9.9
17
+ Requires-Dist: enum-tools<0.13,>=0.12
18
+ Requires-Dist: mt-940<5.0,>=4.0
19
+ Requires-Dist: pydantic<3.0,>=2.0
20
+ Requires-Dist: requests<3.0,>=2.25
21
+ Requires-Dist: sepaxml<2.2,>=2.1
22
+ Description-Content-Type: text/markdown
23
+
24
+ # geldstrom
25
+
26
+ Python package for German banking access and transaction retrieval via FinTS.
27
+
28
+ This package is developed inside the `geldstrom` uv workspace. Use the repository
29
+ root for day-to-day development commands such as `uv sync`, `uv run pytest`, and
30
+ `uv run ruff`.
@@ -0,0 +1,7 @@
1
+ # geldstrom
2
+
3
+ Python package for German banking access and transaction retrieval via FinTS.
4
+
5
+ This package is developed inside the `geldstrom` uv workspace. Use the repository
6
+ root for day-to-day development commands such as `uv sync`, `uv run pytest`, and
7
+ `uv run ruff`.
@@ -0,0 +1,70 @@
1
+ """Geldstrom - A pure Python implementation of FinTS 3.0.
2
+
3
+ This package provides clients for interacting with German banks using
4
+ the FinTS (Financial Transaction Services) protocol.
5
+
6
+ Quick Start:
7
+ from geldstrom import FinTS3Client
8
+
9
+ with FinTS3Client(
10
+ bank_code="12345678",
11
+ server_url="https://banking.example.com/fints",
12
+ user_id="user123",
13
+ pin="mypin",
14
+ product_id="YOUR_PRODUCT_ID",
15
+ ) as client:
16
+ for account in client.list_accounts():
17
+ balance = client.get_balance(account)
18
+ print(f"{account.iban}: {balance.booked.amount}")
19
+ """
20
+
21
+ # --- Client exports (presentation layer) ---
22
+ from geldstrom.clients import FinTS3Client
23
+
24
+ # --- Domain exports ---
25
+ from geldstrom.domain import (
26
+ Account,
27
+ AccountCapabilities,
28
+ AccountOwner,
29
+ BalanceAmount,
30
+ BalanceSnapshot,
31
+ BankCapabilities,
32
+ BankCredentials,
33
+ BankRoute,
34
+ SessionHandle,
35
+ SessionToken,
36
+ TANMethod,
37
+ TANMethodType,
38
+ TransactionEntry,
39
+ TransactionFeed,
40
+ )
41
+
42
+ # --- Advanced/internal exports ---
43
+ from geldstrom.infrastructure.fints import GatewayCredentials
44
+
45
+ # Version
46
+ version = "0.0.2"
47
+ __version__ = version
48
+ __all__ = [
49
+ # Version
50
+ "version",
51
+ # Clients
52
+ "FinTS3Client",
53
+ # Domain models
54
+ "Account",
55
+ "AccountCapabilities",
56
+ "AccountOwner",
57
+ "BalanceAmount",
58
+ "BalanceSnapshot",
59
+ "BankCapabilities",
60
+ "BankCredentials",
61
+ "BankRoute",
62
+ "SessionHandle",
63
+ "SessionToken",
64
+ "TANMethod",
65
+ "TANMethodType",
66
+ "TransactionEntry",
67
+ "TransactionFeed",
68
+ # Advanced (for from_gateway_credentials)
69
+ "GatewayCredentials",
70
+ ]
@@ -0,0 +1,19 @@
1
+ """Client layer - public API for interacting with banks.
2
+
3
+ This module provides the main user-facing clients for FinTS operations.
4
+ Import clients directly from here or from the top-level `geldstrom` package.
5
+
6
+ Example:
7
+ from geldstrom.clients import FinTS3Client
8
+
9
+ # Or from top level:
10
+ from geldstrom import FinTS3Client
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ from .fints3 import FinTS3Client
16
+
17
+ __all__ = [
18
+ "FinTS3Client",
19
+ ]
@@ -0,0 +1,78 @@
1
+ """Base types and protocols for FinTS clients.
2
+
3
+ This module defines the interface that all FinTS client implementations
4
+ should satisfy.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from collections.abc import Sequence
10
+ from datetime import date
11
+ from typing import Protocol
12
+
13
+ from geldstrom.domain import (
14
+ Account,
15
+ BalanceSnapshot,
16
+ BankCapabilities,
17
+ SessionToken,
18
+ TransactionFeed,
19
+ )
20
+ from geldstrom.domain.model.tan import TANMethod
21
+
22
+
23
+ class BankClient(Protocol):
24
+ """
25
+ Protocol defining the interface for a bank client.
26
+
27
+ All client implementations should satisfy this protocol.
28
+ `FinTS3Client` is the primary implementation.
29
+ """
30
+
31
+ def connect(self) -> Sequence[Account]:
32
+ """Establish connection and fetch account list."""
33
+ ...
34
+
35
+ def disconnect(self) -> None:
36
+ """Close the session."""
37
+ ...
38
+
39
+ def list_accounts(self) -> Sequence[Account]:
40
+ """Return available accounts (may trigger connect if needed)."""
41
+ ...
42
+
43
+ def get_balance(self, account: Account | str) -> BalanceSnapshot:
44
+ """Fetch current balance for an account."""
45
+ ...
46
+
47
+ def get_transactions(
48
+ self,
49
+ account: Account | str,
50
+ start_date: date | None = None,
51
+ end_date: date | None = None,
52
+ ) -> TransactionFeed:
53
+ """Fetch transaction history for an account."""
54
+ ...
55
+
56
+ def get_tan_methods(self) -> Sequence[TANMethod]:
57
+ """Get available TAN authentication methods."""
58
+ ...
59
+
60
+ @property
61
+ def session_state(self) -> SessionToken | None:
62
+ """Current session state for persistence."""
63
+ ...
64
+
65
+ @property
66
+ def capabilities(self) -> BankCapabilities | None:
67
+ """Bank's advertised capabilities."""
68
+ ...
69
+
70
+ @property
71
+ def is_connected(self) -> bool:
72
+ """Whether the client is currently connected."""
73
+ ...
74
+
75
+
76
+ __all__ = [
77
+ "BankClient",
78
+ ]