clearbound 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.
- clearbound-0.1.0/PKG-INFO +62 -0
- clearbound-0.1.0/README.md +44 -0
- clearbound-0.1.0/pyproject.toml +37 -0
- clearbound-0.1.0/setup.cfg +4 -0
- clearbound-0.1.0/src/clearbound/__init__.py +21 -0
- clearbound-0.1.0/src/clearbound/_account.py +11 -0
- clearbound-0.1.0/src/clearbound/_cli.py +14 -0
- clearbound-0.1.0/src/clearbound/_client.py +77 -0
- clearbound-0.1.0/src/clearbound/_errors.py +17 -0
- clearbound-0.1.0/src/clearbound.egg-info/PKG-INFO +62 -0
- clearbound-0.1.0/src/clearbound.egg-info/SOURCES.txt +12 -0
- clearbound-0.1.0/src/clearbound.egg-info/dependency_links.txt +1 -0
- clearbound-0.1.0/src/clearbound.egg-info/entry_points.txt +2 -0
- clearbound-0.1.0/src/clearbound.egg-info/top_level.txt +1 -0
|
@@ -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,44 @@
|
|
|
1
|
+
# clearbound
|
|
2
|
+
|
|
3
|
+
Official Python SDK for the [clearbound](https://clearbound.xyz) business
|
|
4
|
+
verification & KYB API: registry checks, beneficial ownership (UBO), sanctions
|
|
5
|
+
and PEP screening, document review, and continuous monitoring — one API, one
|
|
6
|
+
auditable decision.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install clearbound
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Requires Python 3.9+. No third-party dependencies.
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
import clearbound
|
|
20
|
+
|
|
21
|
+
client = clearbound.Client(api_key="sk_test_...") # or set CLEARBOUND_API_KEY
|
|
22
|
+
|
|
23
|
+
verification = client.verifications.create(
|
|
24
|
+
legal_name="Northwind Ventures LLC",
|
|
25
|
+
registration_number="DE-7421199",
|
|
26
|
+
country="US",
|
|
27
|
+
checks=["registry", "ubo", "sanctions", "documents"],
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Plan required
|
|
32
|
+
|
|
33
|
+
API access is available on paid clearbound plans. Until a plan is active on
|
|
34
|
+
your account, every API call raises `clearbound.PlanRequiredError`:
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
try:
|
|
38
|
+
client.verifications.create(legal_name="Northwind Ventures LLC")
|
|
39
|
+
except clearbound.PlanRequiredError as err:
|
|
40
|
+
print(err) # Creating verifications requires an active clearbound plan...
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Visit [clearbound.xyz](https://clearbound.xyz) to activate a plan, or see the
|
|
44
|
+
[API documentation](https://clearbound.xyz/documentation.html).
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "clearbound"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Official Python SDK for the clearbound business verification & KYB API."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = { text = "Proprietary" }
|
|
12
|
+
authors = [{ name = "clearbound" }]
|
|
13
|
+
keywords = [
|
|
14
|
+
"kyb",
|
|
15
|
+
"business verification",
|
|
16
|
+
"beneficial ownership",
|
|
17
|
+
"sanctions screening",
|
|
18
|
+
"compliance",
|
|
19
|
+
]
|
|
20
|
+
classifiers = [
|
|
21
|
+
"Development Status :: 3 - Alpha",
|
|
22
|
+
"Intended Audience :: Developers",
|
|
23
|
+
"License :: Other/Proprietary License",
|
|
24
|
+
"Programming Language :: Python :: 3",
|
|
25
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
26
|
+
"Topic :: Office/Business :: Financial",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://clearbound.xyz"
|
|
31
|
+
Documentation = "https://clearbound.xyz/documentation.html"
|
|
32
|
+
|
|
33
|
+
[project.scripts]
|
|
34
|
+
clearbound = "clearbound._cli:main"
|
|
35
|
+
|
|
36
|
+
[tool.setuptools.packages.find]
|
|
37
|
+
where = ["src"]
|
|
@@ -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
|
+
]
|
|
@@ -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)
|
|
@@ -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())
|
|
@@ -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
|
|
@@ -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,12 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
src/clearbound/__init__.py
|
|
4
|
+
src/clearbound/_account.py
|
|
5
|
+
src/clearbound/_cli.py
|
|
6
|
+
src/clearbound/_client.py
|
|
7
|
+
src/clearbound/_errors.py
|
|
8
|
+
src/clearbound.egg-info/PKG-INFO
|
|
9
|
+
src/clearbound.egg-info/SOURCES.txt
|
|
10
|
+
src/clearbound.egg-info/dependency_links.txt
|
|
11
|
+
src/clearbound.egg-info/entry_points.txt
|
|
12
|
+
src/clearbound.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
clearbound
|