statement-fetch 0.5.0__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.
- statement_fetch/__init__.py +126 -0
- statement_fetch/_contracts.py +532 -0
- statement_fetch/_playwright.py +518 -0
- statement_fetch/_registry.py +132 -0
- statement_fetch/_runner.py +538 -0
- statement_fetch/_staging.py +409 -0
- statement_fetch/_validators.py +242 -0
- statement_fetch/api.py +133 -0
- statement_fetch/cli.py +686 -0
- statement_fetch/demo.py +111 -0
- statement_fetch/providers/__init__.py +1 -0
- statement_fetch/providers/example_bank.py +152 -0
- statement_fetch/py.typed +0 -0
- statement_fetch/sinks/__init__.py +1 -0
- statement_fetch/sinks/directory.py +260 -0
- statement_fetch-0.5.0.dist-info/METADATA +95 -0
- statement_fetch-0.5.0.dist-info/RECORD +20 -0
- statement_fetch-0.5.0.dist-info/WHEEL +4 -0
- statement_fetch-0.5.0.dist-info/entry_points.txt +8 -0
- statement_fetch-0.5.0.dist-info/licenses/LICENSE +21 -0
statement_fetch/api.py
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"""Canonical public plugin, page, staging, validation, and sink API for `statement-fetch`.
|
|
2
|
+
|
|
3
|
+
External and private plugins should import exclusively from `statement_fetch.api` (or top-level `statement_fetch`).
|
|
4
|
+
"""
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from ._contracts import (
|
|
8
|
+
API_VERSION,
|
|
9
|
+
EXIT_ERROR,
|
|
10
|
+
EXIT_LOGIN_TIMEOUT,
|
|
11
|
+
EXIT_OK,
|
|
12
|
+
EXIT_PARTIAL,
|
|
13
|
+
EXIT_USAGE,
|
|
14
|
+
MANIFEST_SCHEMA_VERSION,
|
|
15
|
+
PROVIDER_ENTRY_POINT_GROUP,
|
|
16
|
+
SINK_ENTRY_POINT_GROUP,
|
|
17
|
+
AccountInfo,
|
|
18
|
+
AccountsProvider,
|
|
19
|
+
AccountsRequest,
|
|
20
|
+
Artifact,
|
|
21
|
+
ArtifactSpec,
|
|
22
|
+
Click,
|
|
23
|
+
DownloadMismatchError,
|
|
24
|
+
DownloadTimeoutError,
|
|
25
|
+
DownloadTrigger,
|
|
26
|
+
DuplicatePluginError,
|
|
27
|
+
Evaluate,
|
|
28
|
+
FetchRequest,
|
|
29
|
+
FetchResult,
|
|
30
|
+
FrameLocator,
|
|
31
|
+
Host,
|
|
32
|
+
Keyboard,
|
|
33
|
+
Locator,
|
|
34
|
+
LoginTimeoutError,
|
|
35
|
+
OptionSpec,
|
|
36
|
+
Page,
|
|
37
|
+
Provider,
|
|
38
|
+
ProviderSpec,
|
|
39
|
+
Sink,
|
|
40
|
+
SinkResult,
|
|
41
|
+
TargetResolvingProvider,
|
|
42
|
+
ValidationResult,
|
|
43
|
+
ValidatorFn,
|
|
44
|
+
WindowClosedError,
|
|
45
|
+
resolve_date_range,
|
|
46
|
+
)
|
|
47
|
+
from ._playwright import PlaywrightHost
|
|
48
|
+
from ._registry import PluginRegistry
|
|
49
|
+
from ._runner import (
|
|
50
|
+
parse_provider_options,
|
|
51
|
+
resolve_provider_target,
|
|
52
|
+
run_async_accounts,
|
|
53
|
+
run_async_fetch,
|
|
54
|
+
validate_fetch_request,
|
|
55
|
+
)
|
|
56
|
+
from ._staging import (
|
|
57
|
+
Stage,
|
|
58
|
+
load_manifest,
|
|
59
|
+
open_private_exclusive,
|
|
60
|
+
publish_exclusive_file,
|
|
61
|
+
sanitize_filename,
|
|
62
|
+
sha256_file,
|
|
63
|
+
)
|
|
64
|
+
from ._validators import (
|
|
65
|
+
ManifestArtifact,
|
|
66
|
+
iter_verified_manifest_artifacts,
|
|
67
|
+
validate_csv,
|
|
68
|
+
validate_json,
|
|
69
|
+
validate_pdf,
|
|
70
|
+
validate_zip,
|
|
71
|
+
verify_manifest_artifacts,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
__all__ = [
|
|
75
|
+
"API_VERSION",
|
|
76
|
+
"EXIT_ERROR",
|
|
77
|
+
"EXIT_LOGIN_TIMEOUT",
|
|
78
|
+
"EXIT_OK",
|
|
79
|
+
"EXIT_PARTIAL",
|
|
80
|
+
"EXIT_USAGE",
|
|
81
|
+
"MANIFEST_SCHEMA_VERSION",
|
|
82
|
+
"PROVIDER_ENTRY_POINT_GROUP",
|
|
83
|
+
"SINK_ENTRY_POINT_GROUP",
|
|
84
|
+
"AccountInfo",
|
|
85
|
+
"AccountsProvider",
|
|
86
|
+
"AccountsRequest",
|
|
87
|
+
"Artifact",
|
|
88
|
+
"ArtifactSpec",
|
|
89
|
+
"Click",
|
|
90
|
+
"DownloadMismatchError",
|
|
91
|
+
"DownloadTimeoutError",
|
|
92
|
+
"DownloadTrigger",
|
|
93
|
+
"DuplicatePluginError",
|
|
94
|
+
"Evaluate",
|
|
95
|
+
"FetchRequest",
|
|
96
|
+
"FetchResult",
|
|
97
|
+
"FrameLocator",
|
|
98
|
+
"Host",
|
|
99
|
+
"Keyboard",
|
|
100
|
+
"Locator",
|
|
101
|
+
"LoginTimeoutError",
|
|
102
|
+
"ManifestArtifact",
|
|
103
|
+
"OptionSpec",
|
|
104
|
+
"Page",
|
|
105
|
+
"PlaywrightHost",
|
|
106
|
+
"PluginRegistry",
|
|
107
|
+
"Provider",
|
|
108
|
+
"ProviderSpec",
|
|
109
|
+
"Sink",
|
|
110
|
+
"SinkResult",
|
|
111
|
+
"Stage",
|
|
112
|
+
"TargetResolvingProvider",
|
|
113
|
+
"ValidationResult",
|
|
114
|
+
"ValidatorFn",
|
|
115
|
+
"WindowClosedError",
|
|
116
|
+
"iter_verified_manifest_artifacts",
|
|
117
|
+
"load_manifest",
|
|
118
|
+
"open_private_exclusive",
|
|
119
|
+
"parse_provider_options",
|
|
120
|
+
"publish_exclusive_file",
|
|
121
|
+
"resolve_date_range",
|
|
122
|
+
"resolve_provider_target",
|
|
123
|
+
"run_async_accounts",
|
|
124
|
+
"run_async_fetch",
|
|
125
|
+
"sanitize_filename",
|
|
126
|
+
"sha256_file",
|
|
127
|
+
"validate_csv",
|
|
128
|
+
"validate_fetch_request",
|
|
129
|
+
"validate_json",
|
|
130
|
+
"validate_pdf",
|
|
131
|
+
"validate_zip",
|
|
132
|
+
"verify_manifest_artifacts",
|
|
133
|
+
]
|