camera-client 0.2.7__tar.gz → 0.2.8__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: camera-client
3
- Version: 0.2.7
3
+ Version: 0.2.8
4
4
  Summary: Python SDK for camera calibration and projection transformations - handle lens distortion, coordinate transformations, and 3D ray casting with symbolic expressions.
5
5
  Author-email: Alexander Abramov <extremal.ru@gmail.com>
6
6
  License: MIT
@@ -60,8 +60,18 @@ python -m camera_client get_camera_archive https://example.com/camera.npz
60
60
 
61
61
  # Download from file with URLs (one per line, non-URL lines ignored)
62
62
  python -m camera_client get_camera_archive -f urls.txt -o ./archives
63
+
64
+ # Download from JSON config (list of objects with "archive_url" or "camera_uuid" key)
65
+ python -m camera_client get_camera_archive -f config.json -o ./archives
66
+
67
+ # Download only specific camera from JSON config
68
+ python -m camera_client get_camera_archive -f config.json --camera_id=66 -o ./archives
63
69
  ```
64
70
 
71
+ JSON config entries may use `"archive_url"` (direct link) or `"camera_uuid"` (requires
72
+ `CAMERA_SERVICE_ENTRYPOINT` env variable — the URL is constructed as
73
+ `<CAMERA_SERVICE_ENTRYPOINT>/processing_api/projection_npz_archive/<camera_uuid>`).
74
+
65
75
  ## Quick Start
66
76
 
67
77
  ```python
@@ -30,8 +30,18 @@ python -m camera_client get_camera_archive https://example.com/camera.npz
30
30
 
31
31
  # Download from file with URLs (one per line, non-URL lines ignored)
32
32
  python -m camera_client get_camera_archive -f urls.txt -o ./archives
33
+
34
+ # Download from JSON config (list of objects with "archive_url" or "camera_uuid" key)
35
+ python -m camera_client get_camera_archive -f config.json -o ./archives
36
+
37
+ # Download only specific camera from JSON config
38
+ python -m camera_client get_camera_archive -f config.json --camera_id=66 -o ./archives
33
39
  ```
34
40
 
41
+ JSON config entries may use `"archive_url"` (direct link) or `"camera_uuid"` (requires
42
+ `CAMERA_SERVICE_ENTRYPOINT` env variable — the URL is constructed as
43
+ `<CAMERA_SERVICE_ENTRYPOINT>/processing_api/projection_npz_archive/<camera_uuid>`).
44
+
35
45
  ## Quick Start
36
46
 
37
47
  ```python
@@ -109,7 +109,21 @@ def download_from_file(file_path: str, output_dir: str = ".", camera_id: int = N
109
109
  if camera_id is not None:
110
110
  configs = [c for c in configs if c.get('camera_id') == camera_id]
111
111
 
112
- urls = [c['archive_url'] for c in configs if 'archive_url' in c]
112
+ urls = []
113
+ for c in configs:
114
+ if 'archive_url' in c:
115
+ urls.append(c['archive_url'])
116
+ elif 'camera_uuid' in c:
117
+ entrypoint = os.environ.get('CAMERA_SERVICE_ENTRYPOINT')
118
+ if not entrypoint:
119
+ print(
120
+ "Error: CAMERA_SERVICE_ENTRYPOINT environment variable is required "
121
+ f"for camera_uuid-based entries (camera_id={c.get('camera_id')})",
122
+ file=sys.stderr
123
+ )
124
+ sys.exit(1)
125
+ url = f"{entrypoint.rstrip('/')}/processing_api/projection_npz_archive/{c['camera_uuid']}"
126
+ urls.append(url)
113
127
 
114
128
  if not urls:
115
129
  msg = f"No matching entries found in {file_path}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: camera-client
3
- Version: 0.2.7
3
+ Version: 0.2.8
4
4
  Summary: Python SDK for camera calibration and projection transformations - handle lens distortion, coordinate transformations, and 3D ray casting with symbolic expressions.
5
5
  Author-email: Alexander Abramov <extremal.ru@gmail.com>
6
6
  License: MIT
@@ -60,8 +60,18 @@ python -m camera_client get_camera_archive https://example.com/camera.npz
60
60
 
61
61
  # Download from file with URLs (one per line, non-URL lines ignored)
62
62
  python -m camera_client get_camera_archive -f urls.txt -o ./archives
63
+
64
+ # Download from JSON config (list of objects with "archive_url" or "camera_uuid" key)
65
+ python -m camera_client get_camera_archive -f config.json -o ./archives
66
+
67
+ # Download only specific camera from JSON config
68
+ python -m camera_client get_camera_archive -f config.json --camera_id=66 -o ./archives
63
69
  ```
64
70
 
71
+ JSON config entries may use `"archive_url"` (direct link) or `"camera_uuid"` (requires
72
+ `CAMERA_SERVICE_ENTRYPOINT` env variable — the URL is constructed as
73
+ `<CAMERA_SERVICE_ENTRYPOINT>/processing_api/projection_npz_archive/<camera_uuid>`).
74
+
65
75
  ## Quick Start
66
76
 
67
77
  ```python
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "camera-client"
7
- version = "0.2.7"
7
+ version = "0.2.8"
8
8
  description = "Python SDK for camera calibration and projection transformations - handle lens distortion, coordinate transformations, and 3D ray casting with symbolic expressions."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"
File without changes
File without changes
File without changes
File without changes