sepa-check 0.1.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.
- sepa_check-0.1.0/LICENSE +21 -0
- sepa_check-0.1.0/PKG-INFO +59 -0
- sepa_check-0.1.0/README.md +31 -0
- sepa_check-0.1.0/pyproject.toml +40 -0
- sepa_check-0.1.0/setup.cfg +4 -0
- sepa_check-0.1.0/src/sepa_check/__init__.py +3 -0
- sepa_check-0.1.0/src/sepa_check/__main__.py +4 -0
- sepa_check-0.1.0/src/sepa_check/cli.py +57 -0
- sepa_check-0.1.0/src/sepa_check/client.py +145 -0
- sepa_check-0.1.0/src/sepa_check.egg-info/PKG-INFO +59 -0
- sepa_check-0.1.0/src/sepa_check.egg-info/SOURCES.txt +13 -0
- sepa_check-0.1.0/src/sepa_check.egg-info/dependency_links.txt +1 -0
- sepa_check-0.1.0/src/sepa_check.egg-info/entry_points.txt +2 -0
- sepa_check-0.1.0/src/sepa_check.egg-info/requires.txt +1 -0
- sepa_check-0.1.0/src/sepa_check.egg-info/top_level.txt +1 -0
sepa_check-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bobook Limited
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sepa-check
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: CLI for the free SEPA pain.001 validator API at checksepa.com
|
|
5
|
+
Author-email: Bobook Limited <info@bobook.club>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://checksepa.com
|
|
8
|
+
Project-URL: Documentation, https://checksepa.com/docs
|
|
9
|
+
Project-URL: Repository, https://github.com/wenboteng/sepa-validator
|
|
10
|
+
Project-URL: API waitlist, https://checksepa.com/api-waitlist
|
|
11
|
+
Project-URL: Changelog, https://checksepa.com/changelog
|
|
12
|
+
Keywords: sepa,pain.001,iso20022,validator,iban,xml,credit-transfer
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
23
|
+
Requires-Python: >=3.9
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: requests>=2.31
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# sepa-check
|
|
30
|
+
|
|
31
|
+
Command-line client for the free, keyless SEPA pain.001 validator API.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install sepa-check
|
|
35
|
+
sepa-check pain001.xml
|
|
36
|
+
sepa-check pain001.xml --json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Until the package is on PyPI, install it from a checkout:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install ./cli
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`FILE` is a SEPA XML document. The command posts it as multipart field `file` to `https://checksepa.com/v1/validate`. Python 3.9+. The only dependency is `requests`.
|
|
46
|
+
|
|
47
|
+
No API key. Free limit: 30 validations per IP per hour, 200 per UTC day, 2 MB maximum. HTTP 429 carries `Retry-After`. Higher limits and API keys: https://checksepa.com/api-waitlist
|
|
48
|
+
|
|
49
|
+
Human output lists each finding with its code, path, and line. `--json` prints `valid`, `format`, `version`, `errors`, and `warnings`.
|
|
50
|
+
|
|
51
|
+
| Exit | Meaning |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| 0 | `valid` was true |
|
|
54
|
+
| 1 | the file is invalid |
|
|
55
|
+
| 2 | usage error, unreadable file, or the API could not be reached |
|
|
56
|
+
|
|
57
|
+
Docs: https://checksepa.com/docs · OpenAPI: https://checksepa.com/openapi.json
|
|
58
|
+
|
|
59
|
+
MIT. Copyright (c) 2026 Bobook Limited.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# sepa-check
|
|
2
|
+
|
|
3
|
+
Command-line client for the free, keyless SEPA pain.001 validator API.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install sepa-check
|
|
7
|
+
sepa-check pain001.xml
|
|
8
|
+
sepa-check pain001.xml --json
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Until the package is on PyPI, install it from a checkout:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install ./cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`FILE` is a SEPA XML document. The command posts it as multipart field `file` to `https://checksepa.com/v1/validate`. Python 3.9+. The only dependency is `requests`.
|
|
18
|
+
|
|
19
|
+
No API key. Free limit: 30 validations per IP per hour, 200 per UTC day, 2 MB maximum. HTTP 429 carries `Retry-After`. Higher limits and API keys: https://checksepa.com/api-waitlist
|
|
20
|
+
|
|
21
|
+
Human output lists each finding with its code, path, and line. `--json` prints `valid`, `format`, `version`, `errors`, and `warnings`.
|
|
22
|
+
|
|
23
|
+
| Exit | Meaning |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| 0 | `valid` was true |
|
|
26
|
+
| 1 | the file is invalid |
|
|
27
|
+
| 2 | usage error, unreadable file, or the API could not be reached |
|
|
28
|
+
|
|
29
|
+
Docs: https://checksepa.com/docs · OpenAPI: https://checksepa.com/openapi.json
|
|
30
|
+
|
|
31
|
+
MIT. Copyright (c) 2026 Bobook Limited.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "sepa-check"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "CLI for the free SEPA pain.001 validator API at checksepa.com"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{ name = "Bobook Limited", email = "info@bobook.club" }]
|
|
14
|
+
keywords = ["sepa", "pain.001", "iso20022", "validator", "iban", "xml", "credit-transfer"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 4 - Beta",
|
|
17
|
+
"Environment :: Console",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.9",
|
|
22
|
+
"Programming Language :: Python :: 3.10",
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Topic :: Office/Business :: Financial",
|
|
26
|
+
]
|
|
27
|
+
dependencies = ["requests>=2.31"]
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://checksepa.com"
|
|
31
|
+
Documentation = "https://checksepa.com/docs"
|
|
32
|
+
Repository = "https://github.com/wenboteng/sepa-validator"
|
|
33
|
+
"API waitlist" = "https://checksepa.com/api-waitlist"
|
|
34
|
+
Changelog = "https://checksepa.com/changelog"
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
sepa-check = "sepa_check.cli:main"
|
|
38
|
+
|
|
39
|
+
[tool.setuptools.packages.find]
|
|
40
|
+
where = ["src"]
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""Argument parsing and process exit codes for sepa-check."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import sys
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
from sepa_check.client import ClientError, dumps, format_report, validate_path
|
|
9
|
+
|
|
10
|
+
USAGE = """\
|
|
11
|
+
usage: sepa-check FILE [--json]
|
|
12
|
+
|
|
13
|
+
Validate one SEPA XML file with the free API at
|
|
14
|
+
https://checksepa.com/v1/validate
|
|
15
|
+
|
|
16
|
+
No API key. Limits: 30 requests per IP per hour, 200 per UTC day, 2 MB.
|
|
17
|
+
The file is uploaded for that request and is not stored.
|
|
18
|
+
|
|
19
|
+
--json print the report as JSON on stdout
|
|
20
|
+
|
|
21
|
+
Exit codes:
|
|
22
|
+
0 the file is valid
|
|
23
|
+
1 the file is invalid
|
|
24
|
+
2 usage error, unreadable file, or the API could not be reached
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def main(argv: list[str] | None = None) -> int:
|
|
29
|
+
if argv is None:
|
|
30
|
+
argv = sys.argv[1:]
|
|
31
|
+
as_json = False
|
|
32
|
+
files: list[str] = []
|
|
33
|
+
for arg in argv:
|
|
34
|
+
if arg in ("-h", "--help"):
|
|
35
|
+
sys.stdout.write(USAGE)
|
|
36
|
+
return 0
|
|
37
|
+
if arg == "--json":
|
|
38
|
+
as_json = True
|
|
39
|
+
continue
|
|
40
|
+
if arg.startswith("-"):
|
|
41
|
+
sys.stderr.write(f"unknown option: {arg}\n{USAGE}")
|
|
42
|
+
return 2
|
|
43
|
+
files.append(arg)
|
|
44
|
+
if len(files) != 1:
|
|
45
|
+
sys.stderr.write(USAGE)
|
|
46
|
+
return 2
|
|
47
|
+
path = Path(files[0])
|
|
48
|
+
try:
|
|
49
|
+
result = validate_path(path)
|
|
50
|
+
except ClientError as exc:
|
|
51
|
+
if as_json:
|
|
52
|
+
sys.stdout.write(dumps({"valid": False, "error": str(exc)}))
|
|
53
|
+
else:
|
|
54
|
+
sys.stderr.write(f"{exc}\n")
|
|
55
|
+
return 2
|
|
56
|
+
sys.stdout.write(dumps(result) if as_json else format_report(result, path.name))
|
|
57
|
+
return 0 if result["valid"] else 1
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"""Call the public checksepa.com validator API."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
API_URL = "https://checksepa.com/v1/validate"
|
|
10
|
+
WAITLIST_URL = "https://checksepa.com/api-waitlist"
|
|
11
|
+
DOCS_URL = "https://checksepa.com/docs"
|
|
12
|
+
MAX_BYTES = 2 * 1024 * 1024
|
|
13
|
+
USER_AGENT = "sepa-check/0.1.0 (+https://checksepa.com)"
|
|
14
|
+
TIMEOUT = (10, 120)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ClientError(Exception):
|
|
18
|
+
"""Usage, network, or HTTP failure. The CLI exits 2."""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def content_type_for(name: str) -> str:
|
|
22
|
+
lower = name.lower()
|
|
23
|
+
if lower.endswith(".xml"):
|
|
24
|
+
return "application/xml"
|
|
25
|
+
return "application/octet-stream"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _finding(item: dict[str, Any]) -> dict[str, Any]:
|
|
29
|
+
code = item.get("code") if isinstance(item.get("code"), str) else ""
|
|
30
|
+
message = item.get("message") if isinstance(item.get("message"), str) else ""
|
|
31
|
+
path = item.get("path") if isinstance(item.get("path"), str) else ""
|
|
32
|
+
if not path and isinstance(item.get("location"), str):
|
|
33
|
+
path = item["location"]
|
|
34
|
+
line = item.get("line") if isinstance(item.get("line"), int) else None
|
|
35
|
+
return {"code": code, "message": message, "path": path, "line": line}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _findings(value: Any) -> list[dict[str, Any]]:
|
|
39
|
+
if not isinstance(value, list):
|
|
40
|
+
return []
|
|
41
|
+
return [_finding(item) for item in value if isinstance(item, dict)]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def normalize(report: dict[str, Any]) -> dict[str, Any]:
|
|
45
|
+
"""Keep the public POST /v1/validate shape.
|
|
46
|
+
|
|
47
|
+
``valid``, ``format``, ``version``, ``errors``, and ``warnings``. Each
|
|
48
|
+
finding has ``code``, ``message``, ``path``, and ``line``.
|
|
49
|
+
"""
|
|
50
|
+
valid = report.get("valid")
|
|
51
|
+
if not isinstance(valid, bool):
|
|
52
|
+
valid = report.get("ok") is True
|
|
53
|
+
format_name = report.get("format") if isinstance(report.get("format"), str) else None
|
|
54
|
+
version = report.get("version") if isinstance(report.get("version"), str) else None
|
|
55
|
+
return {
|
|
56
|
+
"valid": valid,
|
|
57
|
+
"format": format_name,
|
|
58
|
+
"version": version,
|
|
59
|
+
"errors": _findings(report.get("errors")),
|
|
60
|
+
"warnings": _findings(report.get("warnings")),
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def format_report(result: dict[str, Any], filename: str = "") -> str:
|
|
65
|
+
lines: list[str] = []
|
|
66
|
+
status = "valid" if result.get("valid") else "invalid"
|
|
67
|
+
lines.append(f"{status}: {filename}".rstrip())
|
|
68
|
+
if result.get("format"):
|
|
69
|
+
lines.append(f"format: {result['format']}")
|
|
70
|
+
if result.get("version"):
|
|
71
|
+
lines.append(f"version: {result['version']}")
|
|
72
|
+
errors = result.get("errors") or []
|
|
73
|
+
warnings = result.get("warnings") or []
|
|
74
|
+
lines.append(f"errors: {len(errors)}")
|
|
75
|
+
lines.append(f"warnings: {len(warnings)}")
|
|
76
|
+
for item in list(errors) + list(warnings):
|
|
77
|
+
lines.append("")
|
|
78
|
+
bits = [str(item.get("code") or "(no code)")]
|
|
79
|
+
if item.get("path"):
|
|
80
|
+
bits.append(str(item["path"]))
|
|
81
|
+
if item.get("line"):
|
|
82
|
+
bits.append(f"line {item['line']}")
|
|
83
|
+
lines.append(" ".join(bits))
|
|
84
|
+
if item.get("message"):
|
|
85
|
+
lines.append(f" message: {item['message']}")
|
|
86
|
+
return "\n".join(lines) + "\n"
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def dumps(result: dict[str, Any]) -> str:
|
|
90
|
+
return json.dumps(result, ensure_ascii=False, indent=2) + "\n"
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def validate_path(path: Path) -> dict[str, Any]:
|
|
94
|
+
if not path.is_file():
|
|
95
|
+
raise ClientError(f"file not found: {path}")
|
|
96
|
+
size = path.stat().st_size
|
|
97
|
+
if size == 0:
|
|
98
|
+
raise ClientError(f"empty file: {path}")
|
|
99
|
+
if size > MAX_BYTES:
|
|
100
|
+
raise ClientError(f"file is larger than 2 MB, the API limit: {path}")
|
|
101
|
+
return validate_bytes(path.name, path.read_bytes(), content_type_for(path.name))
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def validate_bytes(filename: str, data: bytes, content_type: str) -> dict[str, Any]:
|
|
105
|
+
if not data:
|
|
106
|
+
raise ClientError("empty file")
|
|
107
|
+
if len(data) > MAX_BYTES:
|
|
108
|
+
raise ClientError("file is larger than 2 MB, the API limit")
|
|
109
|
+
import requests
|
|
110
|
+
|
|
111
|
+
try:
|
|
112
|
+
response = requests.post(
|
|
113
|
+
API_URL,
|
|
114
|
+
files={"file": (filename, data, content_type)},
|
|
115
|
+
headers={"User-Agent": USER_AGENT, "Accept": "application/json"},
|
|
116
|
+
timeout=TIMEOUT,
|
|
117
|
+
)
|
|
118
|
+
except requests.RequestException as exc:
|
|
119
|
+
raise ClientError(f"network error: {exc}") from exc
|
|
120
|
+
if response.status_code != 200:
|
|
121
|
+
raise ClientError(_http_error(response))
|
|
122
|
+
try:
|
|
123
|
+
payload = response.json()
|
|
124
|
+
except ValueError as exc:
|
|
125
|
+
raise ClientError("API returned a non-JSON response") from exc
|
|
126
|
+
if not isinstance(payload, dict):
|
|
127
|
+
raise ClientError("API returned an unexpected JSON response")
|
|
128
|
+
return normalize(payload)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def _http_error(response: Any) -> str:
|
|
132
|
+
retry = response.headers.get("Retry-After")
|
|
133
|
+
body = (response.text or "").strip().replace("\n", " ")
|
|
134
|
+
if len(body) > 500:
|
|
135
|
+
body = body[:500] + "…"
|
|
136
|
+
if response.status_code == 429:
|
|
137
|
+
wait = f" Retry-After: {retry}s." if retry else ""
|
|
138
|
+
return (
|
|
139
|
+
f"rate limit reached (HTTP 429).{wait} "
|
|
140
|
+
f"Free limit: 30 per IP per hour, 200 per UTC day. Waitlist: {WAITLIST_URL}. {body}"
|
|
141
|
+
).strip()
|
|
142
|
+
if response.status_code == 413:
|
|
143
|
+
return f"file too large (HTTP 413). The API accepts at most 2 MB. {body}".strip()
|
|
144
|
+
extra = f" Retry-After: {retry}s." if retry else ""
|
|
145
|
+
return f"HTTP {response.status_code}.{extra} Docs: {DOCS_URL}. {body}".strip()
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sepa-check
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: CLI for the free SEPA pain.001 validator API at checksepa.com
|
|
5
|
+
Author-email: Bobook Limited <info@bobook.club>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://checksepa.com
|
|
8
|
+
Project-URL: Documentation, https://checksepa.com/docs
|
|
9
|
+
Project-URL: Repository, https://github.com/wenboteng/sepa-validator
|
|
10
|
+
Project-URL: API waitlist, https://checksepa.com/api-waitlist
|
|
11
|
+
Project-URL: Changelog, https://checksepa.com/changelog
|
|
12
|
+
Keywords: sepa,pain.001,iso20022,validator,iban,xml,credit-transfer
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
23
|
+
Requires-Python: >=3.9
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: requests>=2.31
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# sepa-check
|
|
30
|
+
|
|
31
|
+
Command-line client for the free, keyless SEPA pain.001 validator API.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install sepa-check
|
|
35
|
+
sepa-check pain001.xml
|
|
36
|
+
sepa-check pain001.xml --json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Until the package is on PyPI, install it from a checkout:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install ./cli
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`FILE` is a SEPA XML document. The command posts it as multipart field `file` to `https://checksepa.com/v1/validate`. Python 3.9+. The only dependency is `requests`.
|
|
46
|
+
|
|
47
|
+
No API key. Free limit: 30 validations per IP per hour, 200 per UTC day, 2 MB maximum. HTTP 429 carries `Retry-After`. Higher limits and API keys: https://checksepa.com/api-waitlist
|
|
48
|
+
|
|
49
|
+
Human output lists each finding with its code, path, and line. `--json` prints `valid`, `format`, `version`, `errors`, and `warnings`.
|
|
50
|
+
|
|
51
|
+
| Exit | Meaning |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| 0 | `valid` was true |
|
|
54
|
+
| 1 | the file is invalid |
|
|
55
|
+
| 2 | usage error, unreadable file, or the API could not be reached |
|
|
56
|
+
|
|
57
|
+
Docs: https://checksepa.com/docs · OpenAPI: https://checksepa.com/openapi.json
|
|
58
|
+
|
|
59
|
+
MIT. Copyright (c) 2026 Bobook Limited.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/sepa_check/__init__.py
|
|
5
|
+
src/sepa_check/__main__.py
|
|
6
|
+
src/sepa_check/cli.py
|
|
7
|
+
src/sepa_check/client.py
|
|
8
|
+
src/sepa_check.egg-info/PKG-INFO
|
|
9
|
+
src/sepa_check.egg-info/SOURCES.txt
|
|
10
|
+
src/sepa_check.egg-info/dependency_links.txt
|
|
11
|
+
src/sepa_check.egg-info/entry_points.txt
|
|
12
|
+
src/sepa_check.egg-info/requires.txt
|
|
13
|
+
src/sepa_check.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
requests>=2.31
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sepa_check
|