atonode-sdk 0.3.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.
atonode/__init__.py ADDED
@@ -0,0 +1,48 @@
1
+ """Atonode Python SDK. Install ``atonode_sdk``; import ``atonode``."""
2
+
3
+ from exprts_ai import __version__ as __version__
4
+ from exprts_ai.client import ConnectionState, ConnectionStatus, ExprtsClient
5
+ from exprts_ai.config import Config
6
+ from exprts_ai.data import ProjectDataClient
7
+ from exprts_ai.datasets import ProjectDatasetClient, ProjectPipelineClient
8
+ from exprts_ai.errors import (
9
+ APIError,
10
+ AuthenticationError,
11
+ ConfigurationError,
12
+ ExprtsError,
13
+ ProtocolError,
14
+ TransportError,
15
+ )
16
+ from exprts_ai.experiences import ProjectExperienceClient
17
+ from exprts_ai.models import DeviceInfo
18
+ from exprts_ai.realtime import ProjectRealtimeClient
19
+ from exprts_ai.recording import StreamRecorder
20
+ from exprts_ai.storage import ProjectStorageClient
21
+ from exprts_ai.sync import OfflineBuffer
22
+
23
+ AtonodeClient = ExprtsClient
24
+ AtonodeError = ExprtsError
25
+ __all__ = [
26
+ "AtonodeClient",
27
+ "AtonodeError",
28
+ "ExprtsClient",
29
+ "Config",
30
+ "DeviceInfo",
31
+ "ConnectionState",
32
+ "ConnectionStatus",
33
+ "ExprtsError",
34
+ "ConfigurationError",
35
+ "AuthenticationError",
36
+ "APIError",
37
+ "ProtocolError",
38
+ "TransportError",
39
+ "__version__",
40
+ "ProjectDataClient",
41
+ "StreamRecorder",
42
+ "ProjectExperienceClient",
43
+ "ProjectStorageClient",
44
+ "OfflineBuffer",
45
+ "ProjectRealtimeClient",
46
+ "ProjectDatasetClient",
47
+ "ProjectPipelineClient",
48
+ ]
atonode/py.typed ADDED
File without changes
@@ -0,0 +1,183 @@
1
+ Metadata-Version: 2.4
2
+ Name: atonode_sdk
3
+ Version: 0.3.0
4
+ Summary: Atonode robot connectivity, recording and data SDK
5
+ Author: Atonode
6
+ License-Expression: Apache-2.0
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3 :: Only
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Typing :: Typed
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Provides-Extra: dev
17
+ Requires-Dist: pytest>=8; extra == "dev"
18
+ Requires-Dist: build>=1.2; extra == "dev"
19
+ Requires-Dist: twine>=6; extra == "dev"
20
+ Requires-Dist: ruff>=0.11; extra == "dev"
21
+ Requires-Dist: mypy>=1.15; extra == "dev"
22
+ Dynamic: license-file
23
+
24
+ > Atonode 0.3.0 is prepared locally and has not been published. Install this checkout with `python -m pip install ./packages/python-sdk` from the platform root. After publication, the distribution name will be `atonode_sdk`. Existing `exprts-ai` releases remain available under their original name.
25
+
26
+ # Atonode Python SDK
27
+
28
+ SDK v0.3.0 (unpublished), for Python 3.10+. Distribution: **atonode_sdk**. Import: **atonode**. No runtime dependencies.
29
+
30
+ Previous releases are published on [PyPI](https://pypi.org/project/exprts-ai/0.2.0/). Source and quick-start documentation: [Wardieo/exprts-python-sdk](https://github.com/Wardieo/exprts-python-sdk).
31
+
32
+ ## SDK 0.2.0 release
33
+
34
+ Version 0.2.0 adds project tables, streams and recording policies, verified storage transfers, episodes, durable offline buffers, realtime subscriptions, datasets and external pipeline clients. Those capabilities were published as `exprts-ai==0.2.0`. The new Atonode distribution is not published yet; use the local installation above.
35
+
36
+ ## Quick start
37
+
38
+ Register a robot in the customer dashboard and generate its **device credential**. A project API key cannot authenticate a device. Identity is determined by the server; do not supply robot or project IDs.
39
+
40
+ ```bash
41
+ python -m pip install atonode_sdk==0.3.0
42
+ export ATONODE_API_URL=https://api.atonode.com
43
+ read -rs -p 'Device credential: ' ATONODE_DEVICE_TOKEN
44
+ export ATONODE_DEVICE_TOKEN
45
+ ```
46
+
47
+ Use your actual API origin. HTTP is allowed only for `localhost`, `127.0.0.1` and `::1` development. URLs must not include `/v1`, credentials, a query, or a fragment. TLS certificate verification stays enabled; redirects and ambient HTTP proxies are disabled.
48
+
49
+ ```python
50
+ from atonode import AtonodeClient
51
+
52
+ with AtonodeClient(integration="custom") as client:
53
+ # start() / entering the context launches a background thread immediately.
54
+ # Put the existing robot application's loop here; do not wait on cloud access.
55
+ run_local_robot_application()
56
+ ```
57
+
58
+ For a blocking connectivity check outside a control loop:
59
+
60
+ ```python
61
+ from atonode import AtonodeClient, AtonodeError
62
+
63
+ client = AtonodeClient() # Reads ATONODE_API_URL and ATONODE_DEVICE_TOKEN.
64
+ try:
65
+ info = client.connect() # GET /v1/device/verify, POST /v1/device/heartbeat.
66
+ print(info.robot_id, info.heartbeat_interval_seconds)
67
+ except AtonodeError as error:
68
+ print(error) # SDK error text excludes request credentials and server bodies.
69
+ finally:
70
+ client.close()
71
+ ```
72
+
73
+ For local development, install a checkout with `python -m pip install /path/to/python-sdk`.
74
+
75
+ ## API
76
+
77
+ - `AtonodeClient(api_url=None, device_token=None, timeout=3, max_backoff=30, max_retry_after=300, integration="python", runtime=None)`: explicit arguments override environment variables. Default origin is `https://api.atonode.com`; no connection occurs during initialization.
78
+ - `verify() -> DeviceInfo`: blocking credential check, no retries. Does not record a heartbeat.
79
+ - `heartbeat() -> DeviceInfo`: blocking single heartbeat, no retries.
80
+ - `connect() -> DeviceInfo`: blocking verify followed by heartbeat, no retries.
81
+ - `start() -> AtonodeClient`: background verification and heartbeats; duplicate running starts raise `RuntimeError`.
82
+ - `stop(timeout=None) -> bool` / `close()`: signal stop, interrupt retry waits and join. Returns false if a request is still in progress. Restart only once the old worker exits.
83
+ - `wait_until_connected(timeout=10) -> bool`: optional bounded wait, outside control loops.
84
+ - `status -> ConnectionStatus`: immutable snapshot with state, last device response and sanitized error text.
85
+ - `is_connected -> bool`: whether the last connectivity attempt succeeded. It is not a safety signal or a real-time guarantee of network reachability.
86
+
87
+ States: `stopped`, `connecting`, `connected`, `retrying`, `authentication_failed`, `failed`.
88
+
89
+ The background worker follows the server heartbeat interval. Network failures and HTTP 408/429/500/502/503/504 trigger bounded exponential backoff with jitter and re-verification. `Retry-After` supports seconds and HTTP dates, capped by `max_retry_after`. HTTP 401/403 stops the worker rather than repeatedly submitting rejected credentials. Generate/rotate a credential in the dashboard, stop the old client and create a new client with the replacement. Other HTTP errors and invalid/oversized responses stop the worker; inspect `status` before restarting.
90
+
91
+ The three-second default timeout is a socket timeout, not a hard total deadline against a peer that continuously trickles bytes. Shutdown cannot cancel an in-flight standard-library HTTP operation; its join budget defaults to timeout + one second and the worker is a daemon. Never wait for shutdown in a safety-critical control loop. No samples or robot commands are queued, persisted, replayed or sent.
92
+
93
+ ## Robotics integration
94
+
95
+ The worker accesses no robot hardware or simulator objects. Start it beside an existing Python controller and keep local control independent of connectivity. See `examples/webots_controller.py` and `examples/background.py`. ROS, Gazebo, Isaac Sim and other Python runtimes can use the same pattern; native adapters are not included or claimed tested. Webots must use a Python interpreter where this package is installed.
96
+
97
+ SDK v0.1.0 does not implement telemetry ingestion, tables, streams, recording policies, experiences, storage, datasets, managed processing, billing or deployments.
98
+
99
+ ## Development
100
+
101
+ From this SDK directory:
102
+
103
+ ```bash
104
+ python -m venv .venv
105
+ .venv/bin/python -m pip install -e '.[dev]'
106
+ .venv/bin/python -m pytest
107
+ .venv/bin/ruff check .
108
+ .venv/bin/mypy src
109
+ .venv/bin/python -m build
110
+ .venv/bin/python -m twine check dist/*
111
+ ```
112
+
113
+ The included CI workflow runs after this directory is exported as the root of its own repository. The workflow tests Python 3.10–3.14; local results are recorded in `RELEASE.md` and are not a claim that every matrix version has run locally.
114
+
115
+ ## License and contribution
116
+
117
+ Apache License 2.0 applies to this SDK directory only. It does not license the surrounding platform repository. Report security issues privately to the SDK maintainer; do not include credentials in issues, logs or screenshots. Contributions should include focused tests and pass the checks above.
118
+
119
+ ## Tables and stream recording (0.2.0)
120
+
121
+ PyPI `0.2.0` includes these APIs; the older `0.1.0` remains connectivity-only. APIs include `AtonodeClient.get_stream()`, `ingest_stream()`, `recorder()` and `ProjectDataClient` for typed table CRUD/history queries. Use the local Atonode installation above for the examples below. Recording is bounded and in memory, with dropped-sample counters; the later development extension also supports persistent historical synchronization through OfflineBuffer. Configure recorders outside safety-critical control loops.
122
+
123
+
124
+ ## Experiences and storage (0.2.0)
125
+
126
+ Version `0.2.0` also provides `ProjectExperienceClient` (tasks, episodes, original events and completion), `ProjectStorageClient` (verified multipart uploads and checksum-verified downloads), and robot-scoped `AtonodeClient.get_task`, `create_episode`, `append_events` and `complete_episode`. These are blocking methods: call from a separate collection worker, outside safety-critical control loops. The local development version now also includes `OfflineBuffer` for bounded persistent synchronization and `ProjectRealtimeClient` for authenticated cursor subscriptions. These additions are included in PyPI 0.2.0.
127
+
128
+ Use project clients only on trusted servers, with `tasks:read/write`, `episodes:read/write` and `storage:read/write` scopes as needed. Keep operation idempotency keys and source event sequences stable when retrying. Finalized episodes and original events cannot be edited. Raw camera/depth data uses verified storage files; telemetry links use persisted stream batch file IDs. Devices use their own credentials for episode collection and cannot impersonate another robot; project storage keys must stay on trusted backend services.
129
+
130
+ `upload_file(path, idempotency_key=..., content_type=...)` resumes the same reservation by re-uploading bounded parts. `download_file(file_id, destination, max_bytes=...)` streams to a temporary file and verifies size/SHA-256 before replacing the destination. Signed URLs receive no project bearer key. Install 0.2.0 or later for these features.
131
+
132
+
133
+ ### Offline buffers and realtime (0.2.0)
134
+
135
+ `OfflineBuffer(directory, scope=..., max_bytes=..., stream_bytes=..., overflow="reject")`
136
+ provides SQLite-backed FIFO synchronization outside robot control loops. Use `start(client)`,
137
+ `status()`, `retry(job_id)` and `discard(job_id)`. A stable scope identifies the origin/project/robot,
138
+ never a credential. Reopen the same directory after a restart. Queue retries retain idempotency
139
+ keys and integrity hashes; terminal failures block the queue. `enqueue_file(path)` takes a bounded
140
+ immutable recording snapshot. StreamRecorder accepts `offline_buffer=` and a cached `resource=`
141
+ for startup without network access. Close the recorder before closing its buffer.
142
+
143
+ `ProjectRealtimeClient(...).events(topics, stream_ids=..., stop=...)` yields project-scoped
144
+ robot, episode-completion, file-completion or live-stream notifications. Keep cursors to resume,
145
+ deduplicate by sequence, and inspect `diagnostics` for replay gaps. Public browser applications
146
+ must use signed-in sessions rather than embedding project API keys.
147
+
148
+ ### Datasets and pipelines (0.2.0)
149
+
150
+ Version 0.2.0 exports `ProjectDatasetClient` and `ProjectPipelineClient` for trusted server applications. They use project-scoped API keys, immutable dataset manifests, bounded raw downloads and existing verified Storage transfers. `ProjectExperienceClient.export_episodes()` and `.download_episodes()` retrieve original event metadata and associated files. These additions are not part of the published connectivity-only v0.1.0 release.
151
+
152
+ Dataset registration accepts selected completed episode IDs, verified imported files (roles: `data`, `annotation`, `evaluation`), observation/action field descriptions and an idempotency key. Download methods require a separately configured `ProjectStorageClient` with `storage:read`; default maximum total size is 1 GiB. Format declarations do not convert or validate third-party file formats. Webhook configuration requires `pipelines:write` and backend encryption configuration. Keep project API keys out of browser clients and robot control loops.
153
+
154
+ ### Synchronization monitoring (development SDK)
155
+
156
+ The development SDK can report bounded queue metadata to the Synchronization workspace. This addition is not included in the published 0.2.0 package. Start the existing background worker with reporting enabled:
157
+
158
+ ```python
159
+ buffer.start(client, report_interval_seconds=30)
160
+ ```
161
+
162
+ Reporting is optional and uses existing device credentials. It sends queue summaries, up to 25 pending job descriptors and 25 acknowledgment receipts, without sample payloads, file contents or local paths. Report failures do not clear queued data. The dashboard displays the last reported state and marks reports stale after three minutes; it cannot inspect an offline robot’s current queue. Remote retry, pause and discard controls are not supported.
163
+
164
+ ### Optional robot location (development SDK)
165
+
166
+ Supply a GPS fix or a configured deployment position before starting the client. No coordinates are inferred from connectivity. The development SDK includes the cached position in its existing background heartbeats:
167
+
168
+ ```python
169
+ client.set_location(14.5995, 120.9842, source="configured")
170
+ client.start()
171
+ # GPS integration: client.set_location(latitude, longitude, source="gps")
172
+ # Stop reporting fixes: client.set_location(None)
173
+ ```
174
+
175
+ The map retains the last reported location and server receipt timestamp when offline. Receipt time is not GPS measurement time. Reload the project overview to see updated positions. This API is not included in published SDK 0.2.0.
176
+
177
+ ## Rename compatibility
178
+
179
+ New applications use `from atonode import AtonodeClient` and `AtonodeError`. Project clients and recorders are exported from `atonode` with their existing class names. The new distribution includes the legacy `exprts_ai` module; `AtonodeClient` and `ExprtsClient` refer to the same class, and `AtonodeError` and `ExprtsError` refer to the same exception type. Avoid installing both distributions in one environment because they contain the same legacy module. Use a clean environment when migrating.
180
+
181
+ Configuration priority is explicit constructor arguments, then `ATONODE_API_URL` / `ATONODE_DEVICE_TOKEN`, then their legacy `EXPRTS_*` equivalents. An explicitly empty new setting does not fall back to a legacy credential. The default API origin is `https://api.atonode.com`. Existing token formats and webhook headers remain unchanged.
182
+
183
+ Official SDK product: **Atonode Python SDK**. The new GitHub repository name is **`atonode-python-sdk`**. The existing source URL remains in use until the remote repository is renamed; local configuration does not rename the hosted repository. The future robot agent is **Atonode Agent**.
@@ -0,0 +1,22 @@
1
+ atonode/__init__.py,sha256=MuMqgRZaf4Y6rXrmSRgIdQWEL0jQM1TrOcapcJpz3mc,1370
2
+ atonode/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ atonode_sdk-0.3.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
4
+ exprts_ai/__init__.py,sha256=6-YB06Oz0eMFlY1Da-_2EXNwCR15Izi-62D9EKhBWII,1177
5
+ exprts_ai/_types.py,sha256=efVYgUCI31kJ1VshVVJY4S6HhrP5Nzb4w8R8U-iX-w0,924
6
+ exprts_ai/client.py,sha256=4P1OYmxwYpj-0Pz_8AIcD9tfmRZsHke378uDM48sb6E,12369
7
+ exprts_ai/config.py,sha256=NfpRUV0pg1kGN12ZEfKen5sfgs9N5nPWd_Jjkqzl4k0,2877
8
+ exprts_ai/data.py,sha256=KdJY_Q21gZvc8kBIgqKpgqY18_wTIVym1MZh07kcRJs,4887
9
+ exprts_ai/datasets.py,sha256=cWTMkOzt9bxbzxs302YzQeXiswxKIT-WeX_Hziw0IuQ,4312
10
+ exprts_ai/errors.py,sha256=Bri0vy4B1qda8V8wwrdq9oiJ120QwuLad5ZjIf2TjP8,983
11
+ exprts_ai/experiences.py,sha256=eu5Pca8NkwPNAKTDr6dDLmaGI_gV5f7zyCiCb396Abw,3195
12
+ exprts_ai/models.py,sha256=wb-8ac2vFkVp1o4P-WpqNTT3P6mKo3tnfN0hz_MojDw,1883
13
+ exprts_ai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ exprts_ai/realtime.py,sha256=6y1UhxqZjq4ZDiGX-GYBrO6qYhYqis5h9SQaMkJqZbg,3653
15
+ exprts_ai/recording.py,sha256=iRseqPgmfA-wRhicpsEvxPYQms9BenOgIc0h2xAzwc0,9769
16
+ exprts_ai/storage.py,sha256=rgZ8ZGsj1itjOtGvyNnzCe5cqSwpn4o4zyUKgo8CH34,6738
17
+ exprts_ai/sync.py,sha256=YD8wvuB5dIM0e1Acv7RGh6O82676iozQwSpR5zPF0dc,22361
18
+ exprts_ai/transport.py,sha256=nV2b4kfpuRXBfiROxJdmDQ1jTyg4TX-UAC3dUUnwSUU,3961
19
+ atonode_sdk-0.3.0.dist-info/METADATA,sha256=Ap2Yu4dz58h_YW1deVdCqjuriPFHCdh48YUxmoBbxCU,13802
20
+ atonode_sdk-0.3.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
21
+ atonode_sdk-0.3.0.dist-info/top_level.txt,sha256=Zue7ZTAIZoJYmsz8Q4iuOHnQIOWtfW3x1Wr4azQHjVI,18
22
+ atonode_sdk-0.3.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,2 @@
1
+ atonode
2
+ exprts_ai
exprts_ai/__init__.py ADDED
@@ -0,0 +1,44 @@
1
+ """Atonode connectivity SDK. Legacy imports remain supported; new code should import ``atonode``."""
2
+
3
+ from .client import ConnectionState, ConnectionStatus, ExprtsClient
4
+ from .config import Config
5
+ from .data import ProjectDataClient
6
+ from .datasets import ProjectDatasetClient, ProjectPipelineClient
7
+ from .errors import (
8
+ APIError,
9
+ AuthenticationError,
10
+ ConfigurationError,
11
+ ExprtsError,
12
+ ProtocolError,
13
+ TransportError,
14
+ )
15
+ from .experiences import ProjectExperienceClient
16
+ from .models import DeviceInfo
17
+ from .realtime import ProjectRealtimeClient
18
+ from .recording import StreamRecorder
19
+ from .storage import ProjectStorageClient
20
+ from .sync import OfflineBuffer
21
+
22
+ __version__ = "0.3.0"
23
+ __all__ = [
24
+ "ExprtsClient",
25
+ "Config",
26
+ "DeviceInfo",
27
+ "ConnectionState",
28
+ "ConnectionStatus",
29
+ "ExprtsError",
30
+ "ConfigurationError",
31
+ "AuthenticationError",
32
+ "APIError",
33
+ "ProtocolError",
34
+ "TransportError",
35
+ "__version__",
36
+ "ProjectDataClient",
37
+ "StreamRecorder",
38
+ "ProjectExperienceClient",
39
+ "ProjectStorageClient",
40
+ "OfflineBuffer",
41
+ "ProjectRealtimeClient",
42
+ "ProjectDatasetClient",
43
+ "ProjectPipelineClient",
44
+ ]
exprts_ai/_types.py ADDED
@@ -0,0 +1,31 @@
1
+ """Shared SDK contracts. JSON documents have customer-defined fields."""
2
+
3
+ from pathlib import Path
4
+ from typing import Any, Protocol
5
+ from uuid import UUID
6
+
7
+ JSONDict = dict[str, Any]
8
+ Identifier = str | UUID
9
+ FilePath = str | Path
10
+
11
+
12
+ class StreamWriter(Protocol):
13
+ def get_stream(self, stream_id: Identifier) -> JSONDict: ...
14
+ def ingest_stream(self, stream_id: Identifier, batch: JSONDict) -> JSONDict: ...
15
+
16
+
17
+ class EpisodeWriter(Protocol):
18
+ def create_episode(self, **definition: Any) -> JSONDict: ...
19
+ def append_events(self, episode_id: Identifier, events: list[JSONDict]) -> JSONDict: ...
20
+ def complete_episode(self, episode_id: Identifier, **outcome: Any) -> JSONDict: ...
21
+
22
+
23
+ class FileUploader(Protocol):
24
+ def upload_file(
25
+ self,
26
+ path: FilePath,
27
+ *,
28
+ idempotency_key: str,
29
+ content_type: str = "application/octet-stream",
30
+ **metadata: Any,
31
+ ) -> JSONDict: ...