juniper-data-client 0.3.1__tar.gz → 0.4.1__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 (32) hide show
  1. {juniper_data_client-0.3.1 → juniper_data_client-0.4.1}/PKG-INFO +11 -2
  2. {juniper_data_client-0.3.1 → juniper_data_client-0.4.1}/README.md +7 -1
  3. {juniper_data_client-0.3.1 → juniper_data_client-0.4.1}/juniper_data_client/__init__.py +6 -10
  4. juniper_data_client-0.4.1/juniper_data_client/client.py +701 -0
  5. juniper_data_client-0.4.1/juniper_data_client/constants.py +217 -0
  6. juniper_data_client-0.4.1/juniper_data_client/testing/__init__.py +45 -0
  7. juniper_data_client-0.4.1/juniper_data_client/testing/fake_client.py +822 -0
  8. juniper_data_client-0.4.1/juniper_data_client/testing/generators.py +312 -0
  9. {juniper_data_client-0.3.1 → juniper_data_client-0.4.1}/juniper_data_client.egg-info/PKG-INFO +11 -2
  10. juniper_data_client-0.4.1/juniper_data_client.egg-info/SOURCES.txt +28 -0
  11. {juniper_data_client-0.3.1 → juniper_data_client-0.4.1}/juniper_data_client.egg-info/requires.txt +4 -0
  12. {juniper_data_client-0.3.1 → juniper_data_client-0.4.1}/pyproject.toml +41 -5
  13. {juniper_data_client-0.3.1 → juniper_data_client-0.4.1}/tests/test_client.py +200 -9
  14. juniper_data_client-0.4.1/tests/test_create_dataset_tags_ttl.py +140 -0
  15. juniper_data_client-0.4.1/tests/test_fake_client.py +577 -0
  16. juniper_data_client-0.4.1/tests/test_fake_client_batch.py +312 -0
  17. juniper_data_client-0.4.1/tests/test_generator_parity.py +135 -0
  18. juniper_data_client-0.4.1/tests/test_malformed_json_response.py +72 -0
  19. juniper_data_client-0.4.1/tests/test_npzfile_resource_lifecycle.py +138 -0
  20. juniper_data_client-0.4.1/tests/test_on_request_hook.py +210 -0
  21. juniper_data_client-0.4.1/tests/test_performance.py +402 -0
  22. juniper_data_client-0.4.1/tests/test_retry_policy.py +54 -0
  23. juniper_data_client-0.4.1/tests/test_versioning.py +215 -0
  24. juniper_data_client-0.4.1/tests/test_x_request_id_propagation.py +119 -0
  25. juniper_data_client-0.3.1/juniper_data_client/client.py +0 -407
  26. juniper_data_client-0.3.1/juniper_data_client.egg-info/SOURCES.txt +0 -13
  27. {juniper_data_client-0.3.1 → juniper_data_client-0.4.1}/LICENSE +0 -0
  28. {juniper_data_client-0.3.1 → juniper_data_client-0.4.1}/juniper_data_client/exceptions.py +0 -0
  29. {juniper_data_client-0.3.1 → juniper_data_client-0.4.1}/juniper_data_client/py.typed +0 -0
  30. {juniper_data_client-0.3.1 → juniper_data_client-0.4.1}/juniper_data_client.egg-info/dependency_links.txt +0 -0
  31. {juniper_data_client-0.3.1 → juniper_data_client-0.4.1}/juniper_data_client.egg-info/top_level.txt +0 -0
  32. {juniper_data_client-0.3.1 → juniper_data_client-0.4.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: juniper-data-client
3
- Version: 0.3.1
3
+ Version: 0.4.1
4
4
  Summary: HTTP client for the JuniperData dataset generation service
5
5
  Author: Paul Calnon
6
6
  License-Expression: MIT
@@ -31,6 +31,9 @@ Requires-Dist: pytest>=7.0.0; extra == "test"
31
31
  Requires-Dist: pytest-cov>=4.0.0; extra == "test"
32
32
  Requires-Dist: pytest-timeout>=2.2.0; extra == "test"
33
33
  Requires-Dist: responses>=0.23.0; extra == "test"
34
+ Requires-Dist: juniper-observability>=0.1.1; extra == "test"
35
+ Provides-Extra: observability
36
+ Requires-Dist: juniper-observability>=0.1.1; extra == "observability"
34
37
  Provides-Extra: dev
35
38
  Requires-Dist: juniper-data-client[test]; extra == "dev"
36
39
  Requires-Dist: black>=23.0.0; extra == "dev"
@@ -206,6 +209,12 @@ y_train = torch.from_numpy(arrays["y_train"]) # torch.float32
206
209
  | `download_artifact_bytes(id)` | Download raw NPZ bytes |
207
210
  | `get_preview(id, n)` | Get JSON preview of samples |
208
211
  | `delete_dataset(id)` | Delete a dataset |
212
+ | `list_versions(name)` | List version history for a dataset |
213
+ | `get_latest(name)` | Get latest version by name |
214
+ | `batch_delete(dataset_ids)` | Delete multiple datasets |
215
+ | `batch_create(datasets)` | Create multiple datasets |
216
+ | `batch_update_tags(dataset_ids, add_tags, remove_tags)` | Update tags on multiple datasets |
217
+ | `batch_export(dataset_ids)` | Export multiple datasets as ZIP |
209
218
  | `close()` | Close the client session |
210
219
 
211
220
  ### Exceptions
@@ -242,7 +251,7 @@ Downloaded artifacts contain the following numpy arrays (all `float32`):
242
251
 
243
252
  ## Requirements
244
253
 
245
- - Python >=3.11
254
+ - Python >=3.12
246
255
  - numpy >=1.24.0
247
256
  - requests >=2.28.0
248
257
  - urllib3 >=2.0.0
@@ -164,6 +164,12 @@ y_train = torch.from_numpy(arrays["y_train"]) # torch.float32
164
164
  | `download_artifact_bytes(id)` | Download raw NPZ bytes |
165
165
  | `get_preview(id, n)` | Get JSON preview of samples |
166
166
  | `delete_dataset(id)` | Delete a dataset |
167
+ | `list_versions(name)` | List version history for a dataset |
168
+ | `get_latest(name)` | Get latest version by name |
169
+ | `batch_delete(dataset_ids)` | Delete multiple datasets |
170
+ | `batch_create(datasets)` | Create multiple datasets |
171
+ | `batch_update_tags(dataset_ids, add_tags, remove_tags)` | Update tags on multiple datasets |
172
+ | `batch_export(dataset_ids)` | Export multiple datasets as ZIP |
167
173
  | `close()` | Close the client session |
168
174
 
169
175
  ### Exceptions
@@ -200,7 +206,7 @@ Downloaded artifacts contain the following numpy arrays (all `float32`):
200
206
 
201
207
  ## Requirements
202
208
 
203
- - Python >=3.11
209
+ - Python >=3.12
204
210
  - numpy >=1.24.0
205
211
  - requests >=2.28.0
206
212
  - urllib3 >=2.0.0
@@ -4,17 +4,10 @@ This package provides a simple, robust client for interacting with the JuniperDa
4
4
  dataset generation service, used by both JuniperCascor and juniper-canopy.
5
5
  """
6
6
 
7
- from juniper_data_client.client import JuniperDataClient
8
- from juniper_data_client.exceptions import (
9
- JuniperDataClientError,
10
- JuniperDataConfigurationError,
11
- JuniperDataConnectionError,
12
- JuniperDataNotFoundError,
13
- JuniperDataTimeoutError,
14
- JuniperDataValidationError,
15
- )
7
+ from juniper_data_client.client import JuniperDataClient, RequestHook
8
+ from juniper_data_client.exceptions import JuniperDataClientError, JuniperDataConfigurationError, JuniperDataConnectionError, JuniperDataNotFoundError, JuniperDataTimeoutError, JuniperDataValidationError
16
9
 
17
- __version__ = "0.3.1"
10
+ __version__ = "0.4.1"
18
11
 
19
12
  __all__ = [
20
13
  "JuniperDataClient",
@@ -24,5 +17,8 @@ __all__ = [
24
17
  "JuniperDataNotFoundError",
25
18
  "JuniperDataTimeoutError",
26
19
  "JuniperDataValidationError",
20
+ # METRICS-MON R4.3 / seed-13: instrumentation hook type alias
21
+ # exported so consumers can type their hook closures.
22
+ "RequestHook",
27
23
  "__version__",
28
24
  ]