xos-sdk 4.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.
xos_sdk-4.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 GHXSTSHIP Industries LLC
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.
xos_sdk-4.1.0/PKG-INFO ADDED
@@ -0,0 +1,59 @@
1
+ Metadata-Version: 2.4
2
+ Name: xos-sdk
3
+ Version: 4.1.0
4
+ Summary: Python SDK for the XOS public API.
5
+ Author: GHXSTSHIP Industries LLC
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ghxstship/atlas/tree/main/packages/sdk-python
8
+ Project-URL: Issues, https://github.com/ghxstship/atlas/issues
9
+ Project-URL: Source, https://github.com/ghxstship/atlas/tree/main/packages/sdk-python
10
+ Keywords: xos,atlas,api,sdk,openapi
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Typing :: Typed
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Dynamic: license-file
21
+
22
+ # xos-sdk
23
+
24
+ The Python SDK for the XOS public API. Models, methods and the operation table are generated from the OpenAPI v1 document, so every operation in the API reference is a method. It uses only the standard library and runs on Python 3.9 or later.
25
+
26
+ ```sh
27
+ pip install xos-sdk
28
+ ```
29
+
30
+ ## Use
31
+
32
+ ```python
33
+ import os
34
+ from xos_sdk import XosClient
35
+
36
+ xos = XosClient("https://api.ghxstship.tech/v1", api_key=os.environ["XOS_API_KEY"])
37
+
38
+ response = xos.projects.get(project_id)
39
+ xos.projects.update(project_id, {"name": "Harborfront Fall Series"}, if_match=response.etag)
40
+
41
+ for po in xos.purchase_orders.list_all(filter={"po_state": {"eq": "Approved"}}):
42
+ print(po["po_number"])
43
+ ```
44
+
45
+ - Resources are snake_case attributes; `purchaseOrders.approve` is `xos.purchase_orders.approve(po_id, body)`.
46
+ - POST methods send an `Idempotency-Key` and reuse it on retries; updates take `if_match`.
47
+ - Rows are plain dictionaries typed as `TypedDict` models, and the package ships `py.typed`.
48
+
49
+ ## Documentation
50
+
51
+ Guide: [Python SDK](https://github.com/ghxstship/atlas/blob/main/apps/docs/content/guides/en-US/python-sdk.md).
52
+
53
+ ## Versioning
54
+
55
+ The package version follows the XOS release (`v4.0.0` publishes `4.0.0`). Within `/v1` the API changes only additively.
56
+
57
+ ## License
58
+
59
+ MIT. See [LICENSE](LICENSE). The XOS platform itself is AGPL-3.0-only.
@@ -0,0 +1,38 @@
1
+ # xos-sdk
2
+
3
+ The Python SDK for the XOS public API. Models, methods and the operation table are generated from the OpenAPI v1 document, so every operation in the API reference is a method. It uses only the standard library and runs on Python 3.9 or later.
4
+
5
+ ```sh
6
+ pip install xos-sdk
7
+ ```
8
+
9
+ ## Use
10
+
11
+ ```python
12
+ import os
13
+ from xos_sdk import XosClient
14
+
15
+ xos = XosClient("https://api.ghxstship.tech/v1", api_key=os.environ["XOS_API_KEY"])
16
+
17
+ response = xos.projects.get(project_id)
18
+ xos.projects.update(project_id, {"name": "Harborfront Fall Series"}, if_match=response.etag)
19
+
20
+ for po in xos.purchase_orders.list_all(filter={"po_state": {"eq": "Approved"}}):
21
+ print(po["po_number"])
22
+ ```
23
+
24
+ - Resources are snake_case attributes; `purchaseOrders.approve` is `xos.purchase_orders.approve(po_id, body)`.
25
+ - POST methods send an `Idempotency-Key` and reuse it on retries; updates take `if_match`.
26
+ - Rows are plain dictionaries typed as `TypedDict` models, and the package ships `py.typed`.
27
+
28
+ ## Documentation
29
+
30
+ Guide: [Python SDK](https://github.com/ghxstship/atlas/blob/main/apps/docs/content/guides/en-US/python-sdk.md).
31
+
32
+ ## Versioning
33
+
34
+ The package version follows the XOS release (`v4.0.0` publishes `4.0.0`). Within `/v1` the API changes only additively.
35
+
36
+ ## License
37
+
38
+ MIT. See [LICENSE](LICENSE). The XOS platform itself is AGPL-3.0-only.
@@ -0,0 +1,38 @@
1
+ # The XOS Python SDK. Runtime code is hand-written in src/xos_sdk/_runtime; src/xos_sdk/_generated
2
+ # is produced from packages/api/openapi/v1.json by `pnpm --filter @ghxstship/xos-sdk generate` and never edited.
3
+ # Standard library only: no runtime dependencies.
4
+
5
+ [build-system]
6
+ requires = ["setuptools==80.9.0"]
7
+ build-backend = "setuptools.build_meta"
8
+
9
+ [project]
10
+ name = "xos-sdk"
11
+ version = "4.1.0"
12
+ description = "Python SDK for the XOS public API."
13
+ readme = "README.md"
14
+ authors = [{ name = "GHXSTSHIP Industries LLC" }]
15
+ keywords = ["xos", "atlas", "api", "sdk", "openapi"]
16
+ license = "MIT"
17
+ license-files = ["LICENSE"]
18
+ requires-python = ">=3.9"
19
+ dependencies = []
20
+ classifiers = [
21
+ "Development Status :: 5 - Production/Stable",
22
+ "Intended Audience :: Developers",
23
+ "Operating System :: OS Independent",
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3 :: Only",
26
+ "Typing :: Typed",
27
+ ]
28
+
29
+ [project.urls]
30
+ Homepage = "https://github.com/ghxstship/atlas/tree/main/packages/sdk-python"
31
+ Issues = "https://github.com/ghxstship/atlas/issues"
32
+ Source = "https://github.com/ghxstship/atlas/tree/main/packages/sdk-python"
33
+
34
+ [tool.setuptools.packages.find]
35
+ where = ["src"]
36
+
37
+ [tool.setuptools.package-data]
38
+ xos_sdk = ["py.typed"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,83 @@
1
+ """``xos-sdk``: the Python SDK for the XOS public API.
2
+
3
+ The runtime (transport, errors, pagination, webhooks) is hand-written; everything under
4
+ ``_generated`` is produced from ``packages/api/openapi/v1.json`` and never edited by hand.
5
+ """
6
+
7
+ from ._generated.client import XosClient
8
+ from ._generated.operations import API_TITLE, API_VERSION, OPERATIONS, RESOURCES
9
+ from ._runtime.client import Resource, XosClientCore
10
+ from ._runtime.errors import (
11
+ XosApiError,
12
+ XosAuthenticationError,
13
+ XosBadRequestError,
14
+ XosConflictError,
15
+ XosError,
16
+ XosNetworkError,
17
+ XosNotFoundError,
18
+ XosPreconditionFailedError,
19
+ XosPreconditionRequiredError,
20
+ XosRateLimitError,
21
+ XosRefusalError,
22
+ XosServerError,
23
+ XosValidationError,
24
+ error_for_problem,
25
+ parse_retry_after,
26
+ )
27
+ from ._runtime.types import (
28
+ FILTER_OPERATORS,
29
+ ApiResponse,
30
+ Headers,
31
+ OperationSpec,
32
+ Page,
33
+ RateLimit,
34
+ RequestOptions,
35
+ )
36
+ from ._runtime.webhooks import (
37
+ DEFAULT_TOLERANCE_SECONDS,
38
+ SIGNATURE_HEADER,
39
+ WebhookVerification,
40
+ parse_signature_header,
41
+ sign_webhook_payload,
42
+ verify_webhook_signature,
43
+ )
44
+
45
+ __version__ = "4.1.0"
46
+
47
+ __all__ = [
48
+ "API_TITLE",
49
+ "API_VERSION",
50
+ "DEFAULT_TOLERANCE_SECONDS",
51
+ "FILTER_OPERATORS",
52
+ "OPERATIONS",
53
+ "RESOURCES",
54
+ "SIGNATURE_HEADER",
55
+ "ApiResponse",
56
+ "Headers",
57
+ "OperationSpec",
58
+ "Page",
59
+ "RateLimit",
60
+ "RequestOptions",
61
+ "Resource",
62
+ "WebhookVerification",
63
+ "XosApiError",
64
+ "XosAuthenticationError",
65
+ "XosBadRequestError",
66
+ "XosClient",
67
+ "XosClientCore",
68
+ "XosConflictError",
69
+ "XosError",
70
+ "XosNetworkError",
71
+ "XosNotFoundError",
72
+ "XosPreconditionFailedError",
73
+ "XosPreconditionRequiredError",
74
+ "XosRateLimitError",
75
+ "XosRefusalError",
76
+ "XosServerError",
77
+ "XosValidationError",
78
+ "error_for_problem",
79
+ "parse_retry_after",
80
+ "parse_signature_header",
81
+ "sign_webhook_payload",
82
+ "verify_webhook_signature",
83
+ ]
@@ -0,0 +1,2 @@
1
+ # Generated by @ghxstship/xos-sdk codegen from packages/api/openapi/v1.json. Do not edit; run `pnpm --filter @ghxstship/xos-sdk generate`.
2
+ """Generated modules. Import from ``xos_sdk`` instead."""