crosspoint 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.
crosspoint/__init__.py ADDED
@@ -0,0 +1,8 @@
1
+ """Crosspoint API client: the Polar SDK, pointed at Crosspoint.
2
+
3
+ The default API version is 2026-10; pin one with ``from crosspoint.v2026_10 import ...``.
4
+ """
5
+
6
+ from .v2026_10 import CROSSPOINT_API_URL, Crosspoint, CrosspointAsync, webhooks
7
+
8
+ __all__ = ["CROSSPOINT_API_URL", "Crosspoint", "CrosspointAsync", "webhooks"]
crosspoint/_options.py ADDED
@@ -0,0 +1,16 @@
1
+ """Crosspoint's API is Polar's API: the Polar SDK works once it points at Crosspoint."""
2
+
3
+ import os
4
+
5
+ CROSSPOINT_API_URL = "https://api.crosspoint.finance"
6
+ ACCESS_TOKEN_ENV = "CROSSPOINT_ACCESS_TOKEN"
7
+
8
+
9
+ def resolve_access_token(access_token: str | None) -> str:
10
+ token = access_token or os.environ.get(ACCESS_TOKEN_ENV)
11
+ if not token:
12
+ raise ValueError(
13
+ f"Crosspoint: pass access_token or set {ACCESS_TOKEN_ENV} "
14
+ "(an organization access token, cxp_oat_...)."
15
+ )
16
+ return token
crosspoint/py.typed ADDED
File without changes
crosspoint/v2026_04.py ADDED
@@ -0,0 +1,40 @@
1
+ """Crosspoint client for API version 2026_04."""
2
+
3
+ from typing import Any
4
+
5
+ from polar.v2026_04 import Polar, PolarAsync
6
+ from polar.v2026_04 import webhooks as webhooks
7
+
8
+ from ._options import CROSSPOINT_API_URL, resolve_access_token
9
+
10
+ __all__ = ["CROSSPOINT_API_URL", "Crosspoint", "CrosspointAsync", "webhooks"]
11
+
12
+
13
+ class Crosspoint(Polar):
14
+ """`Crosspoint()` reads CROSSPOINT_ACCESS_TOKEN; pass `base_url` only for local development."""
15
+
16
+ def __init__(
17
+ self,
18
+ access_token: str | None = None,
19
+ *,
20
+ base_url: str = CROSSPOINT_API_URL,
21
+ timeout: Any = 5.0,
22
+ ) -> None:
23
+ super().__init__(
24
+ resolve_access_token(access_token), base_url=base_url, timeout=timeout
25
+ )
26
+
27
+
28
+ class CrosspointAsync(PolarAsync):
29
+ """Async client: `async with CrosspointAsync() as crosspoint: ...`."""
30
+
31
+ def __init__(
32
+ self,
33
+ access_token: str | None = None,
34
+ *,
35
+ base_url: str = CROSSPOINT_API_URL,
36
+ timeout: Any = 5.0,
37
+ ) -> None:
38
+ super().__init__(
39
+ resolve_access_token(access_token), base_url=base_url, timeout=timeout
40
+ )
crosspoint/v2026_10.py ADDED
@@ -0,0 +1,40 @@
1
+ """Crosspoint client for API version 2026_10."""
2
+
3
+ from typing import Any
4
+
5
+ from polar.v2026_10 import Polar, PolarAsync
6
+ from polar.v2026_10 import webhooks as webhooks
7
+
8
+ from ._options import CROSSPOINT_API_URL, resolve_access_token
9
+
10
+ __all__ = ["CROSSPOINT_API_URL", "Crosspoint", "CrosspointAsync", "webhooks"]
11
+
12
+
13
+ class Crosspoint(Polar):
14
+ """`Crosspoint()` reads CROSSPOINT_ACCESS_TOKEN; pass `base_url` only for local development."""
15
+
16
+ def __init__(
17
+ self,
18
+ access_token: str | None = None,
19
+ *,
20
+ base_url: str = CROSSPOINT_API_URL,
21
+ timeout: Any = 5.0,
22
+ ) -> None:
23
+ super().__init__(
24
+ resolve_access_token(access_token), base_url=base_url, timeout=timeout
25
+ )
26
+
27
+
28
+ class CrosspointAsync(PolarAsync):
29
+ """Async client: `async with CrosspointAsync() as crosspoint: ...`."""
30
+
31
+ def __init__(
32
+ self,
33
+ access_token: str | None = None,
34
+ *,
35
+ base_url: str = CROSSPOINT_API_URL,
36
+ timeout: Any = 5.0,
37
+ ) -> None:
38
+ super().__init__(
39
+ resolve_access_token(access_token), base_url=base_url, timeout=timeout
40
+ )
@@ -0,0 +1,37 @@
1
+ Metadata-Version: 2.5
2
+ Name: crosspoint
3
+ Version: 0.1.0
4
+ Summary: Crosspoint API client: the Polar SDK, pointed at Crosspoint
5
+ Project-URL: Documentation, https://app.crosspoint.finance/docs/africa/sdks
6
+ License-Expression: MIT
7
+ Requires-Python: >=3.11
8
+ Requires-Dist: polar-sdk>=1.0.0a22
9
+ Description-Content-Type: text/markdown
10
+
11
+ # crosspoint
12
+
13
+ Python client for the [Crosspoint](https://crosspoint.finance) API.
14
+
15
+ Crosspoint's API is compatible with the Polar API, so this package is a thin layer over
16
+ the official `polar-sdk`: same methods and models, already pointed at
17
+ `https://api.crosspoint.finance`.
18
+
19
+ ```bash
20
+ pip install crosspoint
21
+ ```
22
+
23
+ ```python
24
+ from crosspoint import Crosspoint
25
+
26
+ # reads CROSSPOINT_ACCESS_TOKEN (an organization access token, cxp_oat_...)
27
+ crosspoint = Crosspoint()
28
+
29
+ for product in crosspoint.products.iter_list(limit=10):
30
+ print(product)
31
+ ```
32
+
33
+ Async: `from crosspoint import CrosspointAsync`. Pin an API version with
34
+ `from crosspoint.v2026_10 import Crosspoint`. Verify webhooks with
35
+ `crosspoint.webhooks.validate_event`.
36
+
37
+ Docs: https://app.crosspoint.finance/docs/africa/sdks
@@ -0,0 +1,8 @@
1
+ crosspoint/__init__.py,sha256=VuttFwRxJEavDrcUPXx9MuqiZoV7KTTVp7uGQUQeo-E,319
2
+ crosspoint/_options.py,sha256=XXRs3vTllq9DcdyNTHWswyqsIlvZQIXTKs4FlLWqnHA,524
3
+ crosspoint/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ crosspoint/v2026_04.py,sha256=4dmRm-jPejtGaZ7N1boNT55zMY8__3rsC1GUcLj5480,1131
5
+ crosspoint/v2026_10.py,sha256=yn1TnAtWKT3yFn84CIm5x9CaknMDnVfhAXOTs7Mxacw,1131
6
+ crosspoint-0.1.0.dist-info/METADATA,sha256=g5Tqsr6QT7RzRvM8zN2g9NnsJj3M_Trn_4pzDZsCFsg,1096
7
+ crosspoint-0.1.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
8
+ crosspoint-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.4
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any