clearbound 0.1.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.
clearbound/__init__.py ADDED
@@ -0,0 +1,21 @@
1
+ """Official Python SDK for the clearbound business verification & KYB API.
2
+
3
+ https://clearbound.xyz
4
+ """
5
+
6
+ from clearbound._client import Client
7
+ from clearbound._errors import (
8
+ AuthenticationError,
9
+ ClearboundError,
10
+ PlanRequiredError,
11
+ )
12
+
13
+ __version__ = "0.1.0"
14
+
15
+ __all__ = [
16
+ "Client",
17
+ "ClearboundError",
18
+ "AuthenticationError",
19
+ "PlanRequiredError",
20
+ "__version__",
21
+ ]
clearbound/_account.py ADDED
@@ -0,0 +1,11 @@
1
+ from clearbound._errors import PlanRequiredError
2
+
3
+ # Mirror of the server-side paid-plan entitlement. While the API is in private
4
+ # preview this is a hard gate: no account has SDK access until its paid flag
5
+ # is live, so every API-touching call refuses before any request is made.
6
+ PAID_FEATURES_ENABLED = False
7
+
8
+
9
+ def require_active_plan(feature: str) -> None:
10
+ if not PAID_FEATURES_ENABLED:
11
+ raise PlanRequiredError(feature)
clearbound/_cli.py ADDED
@@ -0,0 +1,14 @@
1
+ import sys
2
+
3
+ import clearbound
4
+
5
+
6
+ def main() -> int:
7
+ print(f"clearbound {clearbound.__version__}")
8
+ print("Python SDK for the clearbound business verification & KYB API.")
9
+ print("API access requires an active plan — https://clearbound.xyz")
10
+ return 0
11
+
12
+
13
+ if __name__ == "__main__":
14
+ sys.exit(main())
clearbound/_client.py ADDED
@@ -0,0 +1,77 @@
1
+ import os
2
+ from typing import Optional, Sequence
3
+
4
+ from clearbound import _account
5
+ from clearbound._errors import AuthenticationError
6
+
7
+ API_BASE = "https://api.clearbound.xyz/v1"
8
+
9
+ _KEY_PREFIXES = ("sk_test_", "sk_live_")
10
+
11
+ # Values accepted in Verifications.create(checks=...), per the API docs.
12
+ CHECKS = ("registry", "ubo", "sanctions", "documents", "adverse_media")
13
+
14
+
15
+ class Client:
16
+ """Client for the clearbound API (https://api.clearbound.xyz/v1).
17
+
18
+ Reads the API key from ``api_key`` or the ``CLEARBOUND_API_KEY``
19
+ environment variable. Keys are prefixed ``sk_test_`` (sandbox) or
20
+ ``sk_live_`` (billed).
21
+ """
22
+
23
+ def __init__(self, api_key: Optional[str] = None):
24
+ api_key = api_key or os.environ.get("CLEARBOUND_API_KEY")
25
+ if not api_key:
26
+ raise AuthenticationError(
27
+ "No API key provided. Pass api_key=... or set the "
28
+ "CLEARBOUND_API_KEY environment variable."
29
+ )
30
+ if not api_key.startswith(_KEY_PREFIXES):
31
+ raise AuthenticationError(
32
+ "Invalid API key: keys start with 'sk_test_' or 'sk_live_'."
33
+ )
34
+ self.api_key = api_key
35
+ self.verifications = Verifications(self)
36
+ self.monitoring = Monitoring(self)
37
+
38
+ @property
39
+ def is_live(self) -> bool:
40
+ return self.api_key.startswith("sk_live_")
41
+
42
+
43
+ class Verifications:
44
+ """POST/GET /v1/verifications."""
45
+
46
+ def __init__(self, client: Client):
47
+ self._client = client
48
+
49
+ def create(
50
+ self,
51
+ legal_name: str,
52
+ registration_number: Optional[str] = None,
53
+ country: Optional[str] = None,
54
+ checks: Sequence[str] = ("registry",),
55
+ monitoring: bool = False,
56
+ ) -> dict:
57
+ _account.require_active_plan("Creating verifications")
58
+ raise NotImplementedError # unreachable until the plan gate opens
59
+
60
+ def retrieve(self, verification_id: str) -> dict:
61
+ _account.require_active_plan("Retrieving verifications")
62
+ raise NotImplementedError
63
+
64
+
65
+ class Monitoring:
66
+ """Continuous-monitoring enrolment and alerts."""
67
+
68
+ def __init__(self, client: Client):
69
+ self._client = client
70
+
71
+ def enroll(self, verification_id: str) -> dict:
72
+ _account.require_active_plan("Continuous monitoring")
73
+ raise NotImplementedError
74
+
75
+ def alerts(self) -> list:
76
+ _account.require_active_plan("Continuous monitoring")
77
+ raise NotImplementedError
clearbound/_errors.py ADDED
@@ -0,0 +1,17 @@
1
+ class ClearboundError(Exception):
2
+ """Base class for all clearbound SDK errors."""
3
+
4
+
5
+ class AuthenticationError(ClearboundError):
6
+ """The API key is missing or malformed."""
7
+
8
+
9
+ class PlanRequiredError(ClearboundError):
10
+ """The account does not have a plan with API access enabled."""
11
+
12
+ def __init__(self, feature: str):
13
+ super().__init__(
14
+ f"{feature} requires an active clearbound plan. API access is not "
15
+ "enabled for this account yet — visit https://clearbound.xyz to "
16
+ "activate a plan."
17
+ )
@@ -0,0 +1,62 @@
1
+ Metadata-Version: 2.4
2
+ Name: clearbound
3
+ Version: 0.1.0
4
+ Summary: Official Python SDK for the clearbound business verification & KYB API.
5
+ Author: clearbound
6
+ License: Proprietary
7
+ Project-URL: Homepage, https://clearbound.xyz
8
+ Project-URL: Documentation, https://clearbound.xyz/documentation.html
9
+ Keywords: kyb,business verification,beneficial ownership,sanctions screening,compliance
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: Other/Proprietary License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Topic :: Office/Business :: Financial
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/markdown
18
+
19
+ # clearbound
20
+
21
+ Official Python SDK for the [clearbound](https://clearbound.xyz) business
22
+ verification & KYB API: registry checks, beneficial ownership (UBO), sanctions
23
+ and PEP screening, document review, and continuous monitoring — one API, one
24
+ auditable decision.
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install clearbound
30
+ ```
31
+
32
+ Requires Python 3.9+. No third-party dependencies.
33
+
34
+ ## Usage
35
+
36
+ ```python
37
+ import clearbound
38
+
39
+ client = clearbound.Client(api_key="sk_test_...") # or set CLEARBOUND_API_KEY
40
+
41
+ verification = client.verifications.create(
42
+ legal_name="Northwind Ventures LLC",
43
+ registration_number="DE-7421199",
44
+ country="US",
45
+ checks=["registry", "ubo", "sanctions", "documents"],
46
+ )
47
+ ```
48
+
49
+ ## Plan required
50
+
51
+ API access is available on paid clearbound plans. Until a plan is active on
52
+ your account, every API call raises `clearbound.PlanRequiredError`:
53
+
54
+ ```python
55
+ try:
56
+ client.verifications.create(legal_name="Northwind Ventures LLC")
57
+ except clearbound.PlanRequiredError as err:
58
+ print(err) # Creating verifications requires an active clearbound plan...
59
+ ```
60
+
61
+ Visit [clearbound.xyz](https://clearbound.xyz) to activate a plan, or see the
62
+ [API documentation](https://clearbound.xyz/documentation.html).
@@ -0,0 +1,10 @@
1
+ clearbound/__init__.py,sha256=uu3kXxrvi71o25mmJTUjBqrwWV8ecb64sut73U453y4,392
2
+ clearbound/_account.py,sha256=6sPI3_K0m1EHHCCmHvbj6lpWa7Wa359bENyR9-CcZBE,434
3
+ clearbound/_cli.py,sha256=j2fgzGv2IVuKFebNWpEQuZ26eHqBmUr6NkDqr0hydi4,315
4
+ clearbound/_client.py,sha256=c0sZY6AeXsjXuwj4NHL4P5esIqO4IJVrXMmetKN9Pi0,2438
5
+ clearbound/_errors.py,sha256=ox2U0M0f6xXEtdDehrTl3fklTce-4OJFCyXzIwmxOdQ,557
6
+ clearbound-0.1.0.dist-info/METADATA,sha256=ukzC7OBJ4bP3W8Sj_PnYXr3Sn5kgTd9djwrmR982AuE,1948
7
+ clearbound-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
8
+ clearbound-0.1.0.dist-info/entry_points.txt,sha256=kZmzKPEFHaIDeCODh9PAITYq9RbqiEZOjFD45DE0K94,52
9
+ clearbound-0.1.0.dist-info/top_level.txt,sha256=rNxDWdDSPbKnJn94htrPKq6ScRY4DhNUb_XuM6zhuwI,11
10
+ clearbound-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ clearbound = clearbound._cli:main
@@ -0,0 +1 @@
1
+ clearbound