subspacecomputing 0.1.2__tar.gz → 0.1.5__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.
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5}/LICENSE +1 -1
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5}/MANIFEST.in +6 -0
- {subspacecomputing-0.1.2/subspacecomputing.egg-info → subspacecomputing-0.1.5}/PKG-INFO +69 -27
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5}/README.md +64 -23
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5}/pyproject.toml +5 -4
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5}/setup.py +6 -6
- subspacecomputing-0.1.5/subspacecomputing/__init__.py +29 -0
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5}/subspacecomputing/client.py +112 -9
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5}/subspacecomputing/errors.py +10 -6
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5/subspacecomputing.egg-info}/PKG-INFO +69 -27
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5}/subspacecomputing.egg-info/SOURCES.txt +1 -4
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5}/subspacecomputing.egg-info/requires.txt +1 -0
- subspacecomputing-0.1.2/subspacecomputing/__init__.py +0 -24
- subspacecomputing-0.1.2/tests/test_client_integration.py +0 -320
- subspacecomputing-0.1.2/tests/test_client_unit.py +0 -380
- subspacecomputing-0.1.2/tests/test_pandas_integration.py +0 -41
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5}/setup.cfg +0 -0
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5}/subspacecomputing/utils/__init__.py +0 -0
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5}/subspacecomputing/utils/pandas_integration.py +0 -0
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5}/subspacecomputing.egg-info/dependency_links.txt +0 -0
- {subspacecomputing-0.1.2 → subspacecomputing-0.1.5}/subspacecomputing.egg-info/top_level.txt +0 -0
|
@@ -4,6 +4,12 @@ include README.md
|
|
|
4
4
|
include LICENSE
|
|
5
5
|
include pyproject.toml
|
|
6
6
|
recursive-include subspacecomputing *.py
|
|
7
|
+
prune tests
|
|
8
|
+
prune doc
|
|
9
|
+
prune examples
|
|
10
|
+
recursive-exclude tests *
|
|
11
|
+
recursive-exclude doc *
|
|
12
|
+
recursive-exclude examples *
|
|
7
13
|
recursive-exclude * __pycache__
|
|
8
14
|
recursive-exclude * *.py[co]
|
|
9
15
|
recursive-exclude * .git*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: subspacecomputing
|
|
3
|
-
Version: 0.1.
|
|
4
|
-
Summary: Python SDK for Subspace Computing Engine
|
|
3
|
+
Version: 0.1.5
|
|
4
|
+
Summary: Python SDK for ASTRIA — Subspace Computing Engine
|
|
5
5
|
Home-page: https://www.subspacecomputing.com/developer
|
|
6
|
-
Author:
|
|
7
|
-
Author-email:
|
|
6
|
+
Author: Subspace Computing Inc.
|
|
7
|
+
Author-email: "Subspace Computing Inc." <contact@subspacecomputing.com>
|
|
8
8
|
Project-URL: Documentation, https://www.subspacecomputing.com/developer
|
|
9
9
|
Project-URL: Homepage, https://www.subspacecomputing.com/developer
|
|
10
10
|
Project-URL: Support, https://www.subspacecomputing.com/developer
|
|
@@ -20,14 +20,15 @@ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
|
20
20
|
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
21
21
|
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
22
22
|
Requires-Dist: fastapi>=0.100.0; extra == "dev"
|
|
23
|
+
Requires-Dist: httpx>=0.25.0; extra == "dev"
|
|
23
24
|
Dynamic: author
|
|
24
25
|
Dynamic: home-page
|
|
25
26
|
Dynamic: license-file
|
|
26
27
|
Dynamic: requires-python
|
|
27
28
|
|
|
28
|
-
#
|
|
29
|
+
# ASTRIA — Python SDK
|
|
29
30
|
|
|
30
|
-
Python SDK for the Subspace Computing Engine
|
|
31
|
+
Python SDK for ASTRIA, the Subspace Computing Engine.
|
|
31
32
|
|
|
32
33
|
## Installation
|
|
33
34
|
|
|
@@ -40,13 +41,13 @@ pip install subspacecomputing
|
|
|
40
41
|
### Initialization
|
|
41
42
|
|
|
42
43
|
```python
|
|
43
|
-
from subspacecomputing import
|
|
44
|
+
from subspacecomputing import ASTRIA
|
|
44
45
|
|
|
45
46
|
# Initialize the client (defaults to production URL)
|
|
46
|
-
|
|
47
|
+
client = ASTRIA(api_key='your-api-key-here')
|
|
47
48
|
|
|
48
49
|
# For local testing or custom environments (optional)
|
|
49
|
-
#
|
|
50
|
+
# client = ASTRIA(api_key='your-api-key-here', base_url='http://localhost:8000')
|
|
50
51
|
```
|
|
51
52
|
|
|
52
53
|
### Teams (`X-Team-Id`)
|
|
@@ -56,8 +57,8 @@ Keys can carry a `default_team_id` from the portal. If the user is in **several*
|
|
|
56
57
|
If you omit it when required, the API returns **400** with `error.reason` **`team_context_required`**. Use `ValidationError` and read `exc.reason`.
|
|
57
58
|
|
|
58
59
|
```python
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
client = ASTRIA(api_key="...", team_id="00000000-0000-0000-0000-000000000000")
|
|
61
|
+
client.set_team_id(None) # clear override for following requests
|
|
61
62
|
```
|
|
62
63
|
|
|
63
64
|
### Simple Projection (1 scenario)
|
|
@@ -77,7 +78,7 @@ spec = {
|
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
# Run the projection
|
|
80
|
-
result =
|
|
81
|
+
result = client.project(spec)
|
|
81
82
|
|
|
82
83
|
# Display results
|
|
83
84
|
print(f"Final capital: {result['final_values']['capital']}")
|
|
@@ -107,7 +108,7 @@ spec = {
|
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
# Run the simulation
|
|
110
|
-
result =
|
|
111
|
+
result = client.simulate(spec)
|
|
111
112
|
|
|
112
113
|
# Analyze results
|
|
113
114
|
print(f"Mean final capital: {result['last_mean']['capital']}")
|
|
@@ -161,7 +162,7 @@ aggregations = [
|
|
|
161
162
|
]
|
|
162
163
|
|
|
163
164
|
# Run batch
|
|
164
|
-
result =
|
|
165
|
+
result = client.project_batch(
|
|
165
166
|
template=template,
|
|
166
167
|
batch_params=batch_params,
|
|
167
168
|
aggregations=aggregations
|
|
@@ -175,11 +176,52 @@ print(f"Total capital: {result['aggregations']['capital_total']}")
|
|
|
175
176
|
print(f"Average: {result['aggregations']['moyenne_capital']}")
|
|
176
177
|
```
|
|
177
178
|
|
|
179
|
+
### Runs: read, artifact, rerun, replay
|
|
180
|
+
|
|
181
|
+
Four distinct operations on persisted runs:
|
|
182
|
+
|
|
183
|
+
| Method | What it does |
|
|
184
|
+
|--------|----------------|
|
|
185
|
+
| `get_run(run_id)` | Read metadata, stored SP Model snapshot, and `result_summary` |
|
|
186
|
+
| `get_run_artifact(artifact_id)` | Read heavy results already computed (`final_values` / URL) |
|
|
187
|
+
| `rerun_run(run_id, spec_patch=None)` | Re-execute the run's snapshot in Astria; creates a **new** run |
|
|
188
|
+
| `replay_run(run_id, scenario_id)` | Reproduce **one** Monte Carlo scenario when seeds were stored |
|
|
189
|
+
|
|
190
|
+
```python
|
|
191
|
+
# Cross-language analysis: app computed → Python reads original results
|
|
192
|
+
run = client.get_run(run_id)
|
|
193
|
+
print(run["result_summary"])
|
|
194
|
+
if run.get("artefact_id"):
|
|
195
|
+
artifact = client.get_run_artifact(run["artefact_id"])
|
|
196
|
+
print(artifact.get("final_values"))
|
|
197
|
+
|
|
198
|
+
# Re-execute the exact snapshot (validation) — new run, same projection
|
|
199
|
+
baseline = client.rerun_run(run_id)
|
|
200
|
+
print(baseline["run_id"], baseline["source_spec_hash"], baseline["spec_changed"])
|
|
201
|
+
|
|
202
|
+
# What-if: fork the snapshot with a JSON Merge Patch (source run unchanged)
|
|
203
|
+
what_if = client.rerun_run(
|
|
204
|
+
run_id,
|
|
205
|
+
spec_patch={"meta": {"seed": 42}},
|
|
206
|
+
)
|
|
207
|
+
print(what_if["executed_spec_hash"], what_if["final_values"])
|
|
208
|
+
|
|
209
|
+
# Exact MC scenario reproduction (requires meta.store_seeds_for_replay at creation)
|
|
210
|
+
replay = client.replay_run(run_id, scenario_id=0)
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**Notes**
|
|
214
|
+
|
|
215
|
+
- `rerun_run` does **not** load the projection's current `dsl_template`; it uses the run's stored `spec`.
|
|
216
|
+
- Requires `persist_mode=full` (headless minimal/metadata keys cannot create a new run).
|
|
217
|
+
- Exact stochastic reproduction of one scenario uses `replay_run` + stored seeds; a plain `rerun_run` of a Monte Carlo may draw new samples unless `meta.seed` was in the snapshot.
|
|
218
|
+
- Live `table_refs` may resolve to newer data than at original execution time.
|
|
219
|
+
|
|
178
220
|
### Validation
|
|
179
221
|
|
|
180
222
|
```python
|
|
181
223
|
# Validate an SP Model before execution
|
|
182
|
-
validation =
|
|
224
|
+
validation = client.validate(spec)
|
|
183
225
|
|
|
184
226
|
if validation['is_valid']:
|
|
185
227
|
print("✅ SP Model is valid")
|
|
@@ -193,15 +235,15 @@ else:
|
|
|
193
235
|
|
|
194
236
|
```python
|
|
195
237
|
# Get examples
|
|
196
|
-
examples =
|
|
238
|
+
examples = client.get_examples()
|
|
197
239
|
print(f"Available examples: {len(examples['examples'])}")
|
|
198
240
|
|
|
199
241
|
# Check usage
|
|
200
|
-
usage =
|
|
242
|
+
usage = client.get_usage()
|
|
201
243
|
print(f"Simulations used: {usage['usage']['simulations_used']}/{usage['usage']['simulations_limit']}")
|
|
202
244
|
|
|
203
245
|
# Get plans
|
|
204
|
-
plans =
|
|
246
|
+
plans = client.get_plans()
|
|
205
247
|
for plan in plans['plans']:
|
|
206
248
|
print(f"{plan['name']}: ${plan['price_monthly']}/month")
|
|
207
249
|
```
|
|
@@ -210,16 +252,16 @@ for plan in plans['plans']:
|
|
|
210
252
|
|
|
211
253
|
```python
|
|
212
254
|
from subspacecomputing import (
|
|
213
|
-
|
|
255
|
+
Subspace,
|
|
256
|
+
SubspaceError,
|
|
214
257
|
QuotaExceededError,
|
|
215
258
|
RateLimitError,
|
|
216
259
|
AuthenticationError,
|
|
217
260
|
ValidationError,
|
|
218
|
-
BSCEError
|
|
219
261
|
)
|
|
220
262
|
|
|
221
263
|
try:
|
|
222
|
-
result =
|
|
264
|
+
result = client.simulate(spec)
|
|
223
265
|
except QuotaExceededError as e:
|
|
224
266
|
print(f"Monthly quota exceeded: {e}")
|
|
225
267
|
except RateLimitError as e:
|
|
@@ -229,7 +271,7 @@ except AuthenticationError as e:
|
|
|
229
271
|
print(f"Invalid API key: {e}")
|
|
230
272
|
except ValidationError as e:
|
|
231
273
|
print(f"Validation error: {e.detail}")
|
|
232
|
-
except
|
|
274
|
+
except SubspaceError as e:
|
|
233
275
|
print(f"API error: {e}")
|
|
234
276
|
```
|
|
235
277
|
|
|
@@ -239,15 +281,15 @@ After making a request, you can check your rate limit and quota status:
|
|
|
239
281
|
|
|
240
282
|
```python
|
|
241
283
|
# Make a request
|
|
242
|
-
result =
|
|
284
|
+
result = client.project(spec)
|
|
243
285
|
|
|
244
286
|
# Check rate limit info
|
|
245
|
-
rate_limit =
|
|
287
|
+
rate_limit = client.get_rate_limit_info()
|
|
246
288
|
if rate_limit:
|
|
247
289
|
print(f"Rate limit: {rate_limit['remaining']}/{rate_limit['limit']} remaining")
|
|
248
290
|
|
|
249
291
|
# Check quota info
|
|
250
|
-
quota =
|
|
292
|
+
quota = client.get_quota_info()
|
|
251
293
|
if quota:
|
|
252
294
|
print(f"Quota: {quota['used']}/{quota['limit']} used, {quota['remaining']} remaining")
|
|
253
295
|
```
|
|
@@ -258,7 +300,7 @@ Check out the full documentation at https://www.subspacecomputing.com/developer
|
|
|
258
300
|
|
|
259
301
|
API reference is available at https://www.subspacecomputing.com/docs
|
|
260
302
|
|
|
261
|
-
For support, reach out to contact@
|
|
303
|
+
For support, reach out to contact@subspacecomputing.com
|
|
262
304
|
|
|
263
305
|
## License
|
|
264
306
|
|
|
@@ -266,4 +308,4 @@ MIT License. Check the LICENSE file for details.
|
|
|
266
308
|
|
|
267
309
|
## Copyright
|
|
268
310
|
|
|
269
|
-
©
|
|
311
|
+
© 2026 Subspace Computing Inc. All Rights Reserved
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ASTRIA — Python SDK
|
|
2
2
|
|
|
3
|
-
Python SDK for the Subspace Computing Engine
|
|
3
|
+
Python SDK for ASTRIA, the Subspace Computing Engine.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -13,13 +13,13 @@ pip install subspacecomputing
|
|
|
13
13
|
### Initialization
|
|
14
14
|
|
|
15
15
|
```python
|
|
16
|
-
from subspacecomputing import
|
|
16
|
+
from subspacecomputing import ASTRIA
|
|
17
17
|
|
|
18
18
|
# Initialize the client (defaults to production URL)
|
|
19
|
-
|
|
19
|
+
client = ASTRIA(api_key='your-api-key-here')
|
|
20
20
|
|
|
21
21
|
# For local testing or custom environments (optional)
|
|
22
|
-
#
|
|
22
|
+
# client = ASTRIA(api_key='your-api-key-here', base_url='http://localhost:8000')
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
### Teams (`X-Team-Id`)
|
|
@@ -29,8 +29,8 @@ Keys can carry a `default_team_id` from the portal. If the user is in **several*
|
|
|
29
29
|
If you omit it when required, the API returns **400** with `error.reason` **`team_context_required`**. Use `ValidationError` and read `exc.reason`.
|
|
30
30
|
|
|
31
31
|
```python
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
client = ASTRIA(api_key="...", team_id="00000000-0000-0000-0000-000000000000")
|
|
33
|
+
client.set_team_id(None) # clear override for following requests
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### Simple Projection (1 scenario)
|
|
@@ -50,7 +50,7 @@ spec = {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
# Run the projection
|
|
53
|
-
result =
|
|
53
|
+
result = client.project(spec)
|
|
54
54
|
|
|
55
55
|
# Display results
|
|
56
56
|
print(f"Final capital: {result['final_values']['capital']}")
|
|
@@ -80,7 +80,7 @@ spec = {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
# Run the simulation
|
|
83
|
-
result =
|
|
83
|
+
result = client.simulate(spec)
|
|
84
84
|
|
|
85
85
|
# Analyze results
|
|
86
86
|
print(f"Mean final capital: {result['last_mean']['capital']}")
|
|
@@ -134,7 +134,7 @@ aggregations = [
|
|
|
134
134
|
]
|
|
135
135
|
|
|
136
136
|
# Run batch
|
|
137
|
-
result =
|
|
137
|
+
result = client.project_batch(
|
|
138
138
|
template=template,
|
|
139
139
|
batch_params=batch_params,
|
|
140
140
|
aggregations=aggregations
|
|
@@ -148,11 +148,52 @@ print(f"Total capital: {result['aggregations']['capital_total']}")
|
|
|
148
148
|
print(f"Average: {result['aggregations']['moyenne_capital']}")
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
+
### Runs: read, artifact, rerun, replay
|
|
152
|
+
|
|
153
|
+
Four distinct operations on persisted runs:
|
|
154
|
+
|
|
155
|
+
| Method | What it does |
|
|
156
|
+
|--------|----------------|
|
|
157
|
+
| `get_run(run_id)` | Read metadata, stored SP Model snapshot, and `result_summary` |
|
|
158
|
+
| `get_run_artifact(artifact_id)` | Read heavy results already computed (`final_values` / URL) |
|
|
159
|
+
| `rerun_run(run_id, spec_patch=None)` | Re-execute the run's snapshot in Astria; creates a **new** run |
|
|
160
|
+
| `replay_run(run_id, scenario_id)` | Reproduce **one** Monte Carlo scenario when seeds were stored |
|
|
161
|
+
|
|
162
|
+
```python
|
|
163
|
+
# Cross-language analysis: app computed → Python reads original results
|
|
164
|
+
run = client.get_run(run_id)
|
|
165
|
+
print(run["result_summary"])
|
|
166
|
+
if run.get("artefact_id"):
|
|
167
|
+
artifact = client.get_run_artifact(run["artefact_id"])
|
|
168
|
+
print(artifact.get("final_values"))
|
|
169
|
+
|
|
170
|
+
# Re-execute the exact snapshot (validation) — new run, same projection
|
|
171
|
+
baseline = client.rerun_run(run_id)
|
|
172
|
+
print(baseline["run_id"], baseline["source_spec_hash"], baseline["spec_changed"])
|
|
173
|
+
|
|
174
|
+
# What-if: fork the snapshot with a JSON Merge Patch (source run unchanged)
|
|
175
|
+
what_if = client.rerun_run(
|
|
176
|
+
run_id,
|
|
177
|
+
spec_patch={"meta": {"seed": 42}},
|
|
178
|
+
)
|
|
179
|
+
print(what_if["executed_spec_hash"], what_if["final_values"])
|
|
180
|
+
|
|
181
|
+
# Exact MC scenario reproduction (requires meta.store_seeds_for_replay at creation)
|
|
182
|
+
replay = client.replay_run(run_id, scenario_id=0)
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Notes**
|
|
186
|
+
|
|
187
|
+
- `rerun_run` does **not** load the projection's current `dsl_template`; it uses the run's stored `spec`.
|
|
188
|
+
- Requires `persist_mode=full` (headless minimal/metadata keys cannot create a new run).
|
|
189
|
+
- Exact stochastic reproduction of one scenario uses `replay_run` + stored seeds; a plain `rerun_run` of a Monte Carlo may draw new samples unless `meta.seed` was in the snapshot.
|
|
190
|
+
- Live `table_refs` may resolve to newer data than at original execution time.
|
|
191
|
+
|
|
151
192
|
### Validation
|
|
152
193
|
|
|
153
194
|
```python
|
|
154
195
|
# Validate an SP Model before execution
|
|
155
|
-
validation =
|
|
196
|
+
validation = client.validate(spec)
|
|
156
197
|
|
|
157
198
|
if validation['is_valid']:
|
|
158
199
|
print("✅ SP Model is valid")
|
|
@@ -166,15 +207,15 @@ else:
|
|
|
166
207
|
|
|
167
208
|
```python
|
|
168
209
|
# Get examples
|
|
169
|
-
examples =
|
|
210
|
+
examples = client.get_examples()
|
|
170
211
|
print(f"Available examples: {len(examples['examples'])}")
|
|
171
212
|
|
|
172
213
|
# Check usage
|
|
173
|
-
usage =
|
|
214
|
+
usage = client.get_usage()
|
|
174
215
|
print(f"Simulations used: {usage['usage']['simulations_used']}/{usage['usage']['simulations_limit']}")
|
|
175
216
|
|
|
176
217
|
# Get plans
|
|
177
|
-
plans =
|
|
218
|
+
plans = client.get_plans()
|
|
178
219
|
for plan in plans['plans']:
|
|
179
220
|
print(f"{plan['name']}: ${plan['price_monthly']}/month")
|
|
180
221
|
```
|
|
@@ -183,16 +224,16 @@ for plan in plans['plans']:
|
|
|
183
224
|
|
|
184
225
|
```python
|
|
185
226
|
from subspacecomputing import (
|
|
186
|
-
|
|
227
|
+
Subspace,
|
|
228
|
+
SubspaceError,
|
|
187
229
|
QuotaExceededError,
|
|
188
230
|
RateLimitError,
|
|
189
231
|
AuthenticationError,
|
|
190
232
|
ValidationError,
|
|
191
|
-
BSCEError
|
|
192
233
|
)
|
|
193
234
|
|
|
194
235
|
try:
|
|
195
|
-
result =
|
|
236
|
+
result = client.simulate(spec)
|
|
196
237
|
except QuotaExceededError as e:
|
|
197
238
|
print(f"Monthly quota exceeded: {e}")
|
|
198
239
|
except RateLimitError as e:
|
|
@@ -202,7 +243,7 @@ except AuthenticationError as e:
|
|
|
202
243
|
print(f"Invalid API key: {e}")
|
|
203
244
|
except ValidationError as e:
|
|
204
245
|
print(f"Validation error: {e.detail}")
|
|
205
|
-
except
|
|
246
|
+
except SubspaceError as e:
|
|
206
247
|
print(f"API error: {e}")
|
|
207
248
|
```
|
|
208
249
|
|
|
@@ -212,15 +253,15 @@ After making a request, you can check your rate limit and quota status:
|
|
|
212
253
|
|
|
213
254
|
```python
|
|
214
255
|
# Make a request
|
|
215
|
-
result =
|
|
256
|
+
result = client.project(spec)
|
|
216
257
|
|
|
217
258
|
# Check rate limit info
|
|
218
|
-
rate_limit =
|
|
259
|
+
rate_limit = client.get_rate_limit_info()
|
|
219
260
|
if rate_limit:
|
|
220
261
|
print(f"Rate limit: {rate_limit['remaining']}/{rate_limit['limit']} remaining")
|
|
221
262
|
|
|
222
263
|
# Check quota info
|
|
223
|
-
quota =
|
|
264
|
+
quota = client.get_quota_info()
|
|
224
265
|
if quota:
|
|
225
266
|
print(f"Quota: {quota['used']}/{quota['limit']} used, {quota['remaining']} remaining")
|
|
226
267
|
```
|
|
@@ -231,7 +272,7 @@ Check out the full documentation at https://www.subspacecomputing.com/developer
|
|
|
231
272
|
|
|
232
273
|
API reference is available at https://www.subspacecomputing.com/docs
|
|
233
274
|
|
|
234
|
-
For support, reach out to contact@
|
|
275
|
+
For support, reach out to contact@subspacecomputing.com
|
|
235
276
|
|
|
236
277
|
## License
|
|
237
278
|
|
|
@@ -239,4 +280,4 @@ MIT License. Check the LICENSE file for details.
|
|
|
239
280
|
|
|
240
281
|
## Copyright
|
|
241
282
|
|
|
242
|
-
©
|
|
283
|
+
© 2026 Subspace Computing Inc. All Rights Reserved
|
|
@@ -6,9 +6,9 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "subspacecomputing"
|
|
9
|
-
version = "0.1.
|
|
10
|
-
description = "Python SDK for Subspace Computing Engine
|
|
11
|
-
authors = [{name = "
|
|
9
|
+
version = "0.1.5"
|
|
10
|
+
description = "Python SDK for ASTRIA — Subspace Computing Engine"
|
|
11
|
+
authors = [{name = "Subspace Computing Inc.", email = "contact@subspacecomputing.com"}]
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
requires-python = ">=3.10"
|
|
14
14
|
dependencies = [
|
|
@@ -22,7 +22,8 @@ dev = [
|
|
|
22
22
|
"pytest-cov>=4.0.0",
|
|
23
23
|
"black>=23.0.0",
|
|
24
24
|
"ruff>=0.1.0",
|
|
25
|
-
"fastapi>=0.100.0",
|
|
25
|
+
"fastapi>=0.100.0",
|
|
26
|
+
"httpx>=0.25.0", # TestClient (tests d'intégration)
|
|
26
27
|
]
|
|
27
28
|
|
|
28
29
|
# No Git repository URL: built from a private monorepo; only public product URLs are published on PyPI.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"""
|
|
2
|
-
Setup.py pour le SDK Python
|
|
2
|
+
Setup.py pour le SDK Python ASTRIA — Subspace Computing Engine.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
from setuptools import setup, find_packages
|
|
@@ -9,16 +9,16 @@ try:
|
|
|
9
9
|
with open("README.md", "r", encoding="utf-8") as fh:
|
|
10
10
|
long_description = fh.read()
|
|
11
11
|
except FileNotFoundError:
|
|
12
|
-
long_description = "Python SDK for Subspace Computing Engine API
|
|
12
|
+
long_description = "Python SDK for ASTRIA — Subspace Computing Engine API"
|
|
13
13
|
|
|
14
14
|
setup(
|
|
15
15
|
name="subspacecomputing",
|
|
16
|
-
version="0.1.
|
|
17
|
-
description="Python SDK for Subspace Computing Engine
|
|
16
|
+
version="0.1.5",
|
|
17
|
+
description="Python SDK for ASTRIA — Subspace Computing Engine",
|
|
18
18
|
long_description=long_description,
|
|
19
19
|
long_description_content_type="text/markdown",
|
|
20
|
-
author="
|
|
21
|
-
author_email="contact@
|
|
20
|
+
author="Subspace Computing Inc.",
|
|
21
|
+
author_email="contact@subspacecomputing.com",
|
|
22
22
|
url="https://www.subspacecomputing.com/developer",
|
|
23
23
|
packages=find_packages(),
|
|
24
24
|
install_requires=[
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ASTRIA — Python SDK
|
|
3
|
+
|
|
4
|
+
Python SDK for ASTRIA, the Subspace Computing Engine.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from .client import ASTRIA, Subspace, BSCE # Subspace & BSCE = backward compat aliases
|
|
8
|
+
from .errors import (
|
|
9
|
+
SubspaceError,
|
|
10
|
+
BSCEError, # backward compat alias
|
|
11
|
+
QuotaExceededError,
|
|
12
|
+
RateLimitError,
|
|
13
|
+
AuthenticationError,
|
|
14
|
+
ValidationError,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
__version__ = "0.1.5"
|
|
18
|
+
__all__ = [
|
|
19
|
+
"ASTRIA",
|
|
20
|
+
"SubspaceError",
|
|
21
|
+
"QuotaExceededError",
|
|
22
|
+
"RateLimitError",
|
|
23
|
+
"AuthenticationError",
|
|
24
|
+
"ValidationError",
|
|
25
|
+
# Backward compatibility
|
|
26
|
+
"Subspace",
|
|
27
|
+
"BSCE",
|
|
28
|
+
"BSCEError",
|
|
29
|
+
]
|