cexy 0.1.0.dev1__tar.gz → 0.1.0.dev2__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.
Files changed (34) hide show
  1. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/CHANGELOG.md +7 -1
  2. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/PKG-INFO +5 -3
  3. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/README.md +4 -2
  4. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/__init__.py +2 -0
  5. cexy-0.1.0.dev2/cexy/_version.py +1 -0
  6. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/errors.py +9 -2
  7. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/pyproject.toml +1 -1
  8. cexy-0.1.0.dev1/cexy/_version.py +0 -1
  9. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/.gitignore +0 -0
  10. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/LICENSE +0 -0
  11. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/SECURITY.md +0 -0
  12. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_async/__init__.py +0 -0
  13. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_async/client.py +0 -0
  14. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_async/pagination.py +0 -0
  15. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_async/resources.py +0 -0
  16. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_async/transport.py +0 -0
  17. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_common.py +0 -0
  18. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_decimal.py +0 -0
  19. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_enum.py +0 -0
  20. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_generated/__init__.py +0 -0
  21. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_generated/models.py +0 -0
  22. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_generated/operations.py +0 -0
  23. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_opmap.py +0 -0
  24. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_ratelimit.py +0 -0
  25. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_retry.py +0 -0
  26. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_sync/__init__.py +0 -0
  27. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_sync/client.py +0 -0
  28. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_sync/pagination.py +0 -0
  29. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_sync/resources.py +0 -0
  30. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/_sync/transport.py +0 -0
  31. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/auth.py +0 -0
  32. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/models.py +0 -0
  33. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/py.typed +0 -0
  34. {cexy-0.1.0.dev1 → cexy-0.1.0.dev2}/cexy/ws.py +0 -0
@@ -3,7 +3,13 @@
3
3
  All notable changes to this project are documented here. The SDK stays at 0.x until API
4
4
  request signing (HMAC) ships; see "Versioning" in README.md.
5
5
 
6
- ## 0.1.0.dev1 (unreleased)
6
+ ## 0.1.0.dev2 (unreleased)
7
+
8
+ - `JurisdictionBlockedError` (a `ForbiddenError` subclass) for `JURISDICTION_BLOCKED` / HTTP 451.
9
+ - README: pre-releases install with `pip install --pre cexy` (the PyPI page for 0.1.0.dev1 still says `pip install cexy`, which does not install a pre-release).
10
+ - `spec/errors.yaml` is now generated upstream from the spec's `ErrorCode` (same 44 codes).
11
+
12
+ ## 0.1.0.dev1 (2026-09-27)
7
13
 
8
14
  First published pre-release. 0.1.0.dev0 was tagged but never reached PyPI: the pinned publish
9
15
  action (v1.12.4, twine 6.1.0) rejected wheel metadata version 2.5. The publish action is now
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: cexy
3
- Version: 0.1.0.dev1
3
+ Version: 0.1.0.dev2
4
4
  Summary: Python SDK for the CEXY.io exchange REST and WebSocket API
5
5
  Project-URL: Homepage, https://cexy.io
6
6
  Project-URL: Source, https://github.com/cexyio/cexy-python
@@ -44,12 +44,13 @@ Typed Python client for the [CEXY.io](https://cexy.io) exchange REST and WebSock
44
44
  - Client-side rate limiting, cursor pagination
45
45
  - WebSocket client with heartbeat, reconnect and a self-syncing order book
46
46
 
47
- > Status: **0.1.0.dev1, pre-release.** The API may change before 1.0 (see [Versioning](#versioning)).
47
+ > Status: **0.1.0.dev2, pre-release.** The API may change before 1.0 (see [Versioning](#versioning)).
48
+ > Pre-releases need `--pre`: `pip install --pre cexy`.
48
49
 
49
50
  ## Install
50
51
 
51
52
  ```bash
52
- pip install cexy # Python 3.9+
53
+ pip install --pre cexy # Python 3.9+ (--pre while releases are 0.1.0.devN)
53
54
  ```
54
55
 
55
56
  ## Quickstart: public market data
@@ -146,6 +147,7 @@ message.
146
147
  | `ValidationError` | 400, e.g. `VALIDATION_FAILED`, `PRECISION_EXCEEDED` (see `fields`) |
147
148
  | `AuthenticationError` | 401, e.g. `UNAUTHENTICATED`, `INVALID_CREDENTIALS` |
148
149
  | `ForbiddenError` | 403: `FORBIDDEN` (key lacks a scope), `API_KEY_NOT_ALLOWED` (session-only endpoint) |
150
+ | `JurisdictionBlockedError` | 451: `JURISDICTION_BLOCKED` (not available in the caller's jurisdiction); a `ForbiddenError` subclass |
149
151
  | `NotFoundError` | 404 |
150
152
  | `ConflictError` | 409, e.g. `ALREADY_EXISTS`, `IDEMPOTENCY_KEY_CONFLICT` |
151
153
  | `UnprocessableError` | 422, e.g. `INSUFFICIENT_FUNDS`, `MARKET_UNAVAILABLE` |
@@ -8,12 +8,13 @@ Typed Python client for the [CEXY.io](https://cexy.io) exchange REST and WebSock
8
8
  - Client-side rate limiting, cursor pagination
9
9
  - WebSocket client with heartbeat, reconnect and a self-syncing order book
10
10
 
11
- > Status: **0.1.0.dev1, pre-release.** The API may change before 1.0 (see [Versioning](#versioning)).
11
+ > Status: **0.1.0.dev2, pre-release.** The API may change before 1.0 (see [Versioning](#versioning)).
12
+ > Pre-releases need `--pre`: `pip install --pre cexy`.
12
13
 
13
14
  ## Install
14
15
 
15
16
  ```bash
16
- pip install cexy # Python 3.9+
17
+ pip install --pre cexy # Python 3.9+ (--pre while releases are 0.1.0.devN)
17
18
  ```
18
19
 
19
20
  ## Quickstart: public market data
@@ -110,6 +111,7 @@ message.
110
111
  | `ValidationError` | 400, e.g. `VALIDATION_FAILED`, `PRECISION_EXCEEDED` (see `fields`) |
111
112
  | `AuthenticationError` | 401, e.g. `UNAUTHENTICATED`, `INVALID_CREDENTIALS` |
112
113
  | `ForbiddenError` | 403: `FORBIDDEN` (key lacks a scope), `API_KEY_NOT_ALLOWED` (session-only endpoint) |
114
+ | `JurisdictionBlockedError` | 451: `JURISDICTION_BLOCKED` (not available in the caller's jurisdiction); a `ForbiddenError` subclass |
113
115
  | `NotFoundError` | 404 |
114
116
  | `ConflictError` | 409, e.g. `ALREADY_EXISTS`, `IDEMPOTENCY_KEY_CONFLICT` |
115
117
  | `UnprocessableError` | 422, e.g. `INSUFFICIENT_FUNDS`, `MARKET_UNAVAILABLE` |
@@ -22,6 +22,7 @@ from cexy.errors import (
22
22
  ConfigurationError,
23
23
  ConflictError,
24
24
  ForbiddenError,
25
+ JurisdictionBlockedError,
25
26
  MissingCredentialsError,
26
27
  NotFoundError,
27
28
  RateLimitError,
@@ -44,6 +45,7 @@ __all__ = [
44
45
  "ConfigurationError",
45
46
  "ConflictError",
46
47
  "ForbiddenError",
48
+ "JurisdictionBlockedError",
47
49
  "HeaderKeyAuth",
48
50
  "MissingCredentialsError",
49
51
  "NotFoundError",
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0.dev2"
@@ -81,6 +81,13 @@ class ForbiddenError(CexyApiError):
81
81
  (``API_KEY_NOT_ALLOWED``), or the account/region is restricted."""
82
82
 
83
83
 
84
+ class JurisdictionBlockedError(ForbiddenError):
85
+ """451: the service is not available in the caller's jurisdiction (``JURISDICTION_BLOCKED``).
86
+
87
+ A subclass of :class:`ForbiddenError`, so existing ``except ForbiddenError`` handlers still
88
+ catch it; catch it directly to show a dedicated message. Retrying will not help."""
89
+
90
+
84
91
  class ValidationError(CexyApiError):
85
92
  """400: the request failed validation. ``fields`` maps field names to problems."""
86
93
 
@@ -139,8 +146,8 @@ for _cls, _codes in {
139
146
  "ACCOUNT_ON_HOLD",
140
147
  "EMAIL_NOT_VERIFIED",
141
148
  "REGION_BLOCKED",
142
- "JURISDICTION_BLOCKED", # HTTP 451
143
149
  ),
150
+ JurisdictionBlockedError: ("JURISDICTION_BLOCKED",),
144
151
  NotFoundError: ("NOT_FOUND",),
145
152
  ConflictError: (
146
153
  "ALREADY_EXISTS",
@@ -170,7 +177,7 @@ _BY_STATUS: Dict[int, Type[CexyApiError]] = {
170
177
  400: ValidationError,
171
178
  401: AuthenticationError,
172
179
  403: ForbiddenError,
173
- 451: ForbiddenError, # unavailable for legal reasons (JURISDICTION_BLOCKED)
180
+ 451: JurisdictionBlockedError, # unavailable for legal reasons
174
181
  404: NotFoundError,
175
182
  409: ConflictError,
176
183
  422: UnprocessableError,
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "cexy"
7
- version = "0.1.0.dev1"
7
+ version = "0.1.0.dev2"
8
8
  description = "Python SDK for the CEXY.io exchange REST and WebSocket API"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1 +0,0 @@
1
- __version__ = "0.1.0.dev1"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes