adss 1.29__tar.gz → 1.30__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.
- {adss-1.29 → adss-1.30}/PKG-INFO +1 -1
- {adss-1.29 → adss-1.30}/adss/endpoints/images.py +14 -112
- {adss-1.29 → adss-1.30}/adss.egg-info/PKG-INFO +1 -1
- {adss-1.29 → adss-1.30}/pyproject.toml +1 -1
- {adss-1.29 → adss-1.30}/LICENSE +0 -0
- {adss-1.29 → adss-1.30}/README.md +0 -0
- {adss-1.29 → adss-1.30}/adss/__init__.py +0 -0
- {adss-1.29 → adss-1.30}/adss/auth.py +0 -0
- {adss-1.29 → adss-1.30}/adss/client.py +0 -0
- {adss-1.29 → adss-1.30}/adss/endpoints/__init__.py +0 -0
- {adss-1.29 → adss-1.30}/adss/endpoints/admin.py +0 -0
- {adss-1.29 → adss-1.30}/adss/endpoints/metadata.py +0 -0
- {adss-1.29 → adss-1.30}/adss/endpoints/queries.py +0 -0
- {adss-1.29 → adss-1.30}/adss/endpoints/users.py +0 -0
- {adss-1.29 → adss-1.30}/adss/exceptions.py +0 -0
- {adss-1.29 → adss-1.30}/adss/models/__init__.py +0 -0
- {adss-1.29 → adss-1.30}/adss/models/metadata.py +0 -0
- {adss-1.29 → adss-1.30}/adss/models/query.py +0 -0
- {adss-1.29 → adss-1.30}/adss/models/user.py +0 -0
- {adss-1.29 → adss-1.30}/adss/utils.py +0 -0
- {adss-1.29 → adss-1.30}/adss.egg-info/SOURCES.txt +0 -0
- {adss-1.29 → adss-1.30}/adss.egg-info/dependency_links.txt +0 -0
- {adss-1.29 → adss-1.30}/adss.egg-info/requires.txt +0 -0
- {adss-1.29 → adss-1.30}/adss.egg-info/top_level.txt +0 -0
- {adss-1.29 → adss-1.30}/dev/fetch_idr6.py +0 -0
- {adss-1.29 → adss-1.30}/setup.cfg +0 -0
{adss-1.29 → adss-1.30}/PKG-INFO
RENAMED
@@ -25,7 +25,7 @@ class ImagesEndpoint:
|
|
25
25
|
params = {"skip": skip, "limit": limit}
|
26
26
|
|
27
27
|
try:
|
28
|
-
resp = self.auth_manager.
|
28
|
+
resp = self.auth_manager.download(
|
29
29
|
method="GET",
|
30
30
|
url=url,
|
31
31
|
headers=headers,
|
@@ -46,7 +46,7 @@ class ImagesEndpoint:
|
|
46
46
|
headers = {"Accept": "application/json"}
|
47
47
|
|
48
48
|
try:
|
49
|
-
resp = self.auth_manager.
|
49
|
+
resp = self.auth_manager.download(
|
50
50
|
method="GET",
|
51
51
|
url=url,
|
52
52
|
headers=headers,
|
@@ -58,68 +58,6 @@ class ImagesEndpoint:
|
|
58
58
|
except Exception as e:
|
59
59
|
raise ResourceNotFoundError(f"Failed to get image collection {collection_id}: {e}")
|
60
60
|
|
61
|
-
def create_collection(self, name: str, base_path: str, description: Optional[str] = None, **kwargs) -> Dict[str, Any]:
|
62
|
-
url = f"{self.base_url}/adss/v1/images/collections/"
|
63
|
-
headers = self.auth_manager._get_auth_headers()
|
64
|
-
payload = {"name": name, "base_path": base_path}
|
65
|
-
if description:
|
66
|
-
payload["description"] = description
|
67
|
-
|
68
|
-
try:
|
69
|
-
resp = self.auth_manager.request(
|
70
|
-
method="POST",
|
71
|
-
url=url,
|
72
|
-
headers=headers,
|
73
|
-
json=payload,
|
74
|
-
auth_required=True,
|
75
|
-
**kwargs
|
76
|
-
)
|
77
|
-
handle_response_errors(resp)
|
78
|
-
return resp.json()
|
79
|
-
except Exception as e:
|
80
|
-
raise ResourceNotFoundError(f"Failed to create image collection: {e}")
|
81
|
-
|
82
|
-
def update_collection(self, collection_id: int, name: Optional[str] = None,
|
83
|
-
description: Optional[str] = None, **kwargs) -> Dict[str, Any]:
|
84
|
-
url = f"{self.base_url}/adss/v1/images/collections/{collection_id}"
|
85
|
-
headers = self.auth_manager._get_auth_headers()
|
86
|
-
payload: Dict[str, Any] = {}
|
87
|
-
if name:
|
88
|
-
payload["name"] = name
|
89
|
-
if description is not None:
|
90
|
-
payload["description"] = description
|
91
|
-
|
92
|
-
try:
|
93
|
-
resp = self.auth_manager.request(
|
94
|
-
method="PUT",
|
95
|
-
url=url,
|
96
|
-
headers=headers,
|
97
|
-
json=payload,
|
98
|
-
auth_required=True,
|
99
|
-
**kwargs
|
100
|
-
)
|
101
|
-
handle_response_errors(resp)
|
102
|
-
return resp.json()
|
103
|
-
except Exception as e:
|
104
|
-
raise ResourceNotFoundError(f"Failed to update collection {collection_id}: {e}")
|
105
|
-
|
106
|
-
def delete_collection(self, collection_id: int, **kwargs) -> bool:
|
107
|
-
url = f"{self.base_url}/adss/v1/images/collections/{collection_id}"
|
108
|
-
headers = self.auth_manager._get_auth_headers()
|
109
|
-
|
110
|
-
try:
|
111
|
-
resp = self.auth_manager.request(
|
112
|
-
method="DELETE",
|
113
|
-
url=url,
|
114
|
-
headers=headers,
|
115
|
-
auth_required=True,
|
116
|
-
**kwargs
|
117
|
-
)
|
118
|
-
handle_response_errors(resp)
|
119
|
-
return True
|
120
|
-
except Exception as e:
|
121
|
-
raise ResourceNotFoundError(f"Failed to delete collection {collection_id}: {e}")
|
122
|
-
|
123
61
|
def list_files(self,
|
124
62
|
collection_id: int,
|
125
63
|
skip: int = 0,
|
@@ -203,7 +141,7 @@ class ImagesEndpoint:
|
|
203
141
|
url = f"{self.base_url}/adss/v1/images/files/{file_id}/download?token={self.auth_manager.token}"
|
204
142
|
|
205
143
|
try:
|
206
|
-
resp = self.auth_manager.
|
144
|
+
resp = self.auth_manager.download(
|
207
145
|
method="GET",
|
208
146
|
url=url,
|
209
147
|
stream=True,
|
@@ -226,42 +164,6 @@ class ImagesEndpoint:
|
|
226
164
|
except Exception as e:
|
227
165
|
raise ResourceNotFoundError(f"Failed to download image file {file_id}: {e}")
|
228
166
|
|
229
|
-
def scan_directory(self, collection_id: int, rescan_existing: bool = False, **kwargs) -> Dict[str, Any]:
|
230
|
-
url = f"{self.base_url}/adss/v1/images/collections/{collection_id}/scan"
|
231
|
-
headers = self.auth_manager._get_auth_headers()
|
232
|
-
payload = {"rescan_existing": rescan_existing}
|
233
|
-
|
234
|
-
try:
|
235
|
-
resp = self.auth_manager.request(
|
236
|
-
method="POST",
|
237
|
-
url=url,
|
238
|
-
headers=headers,
|
239
|
-
json=payload,
|
240
|
-
auth_required=True,
|
241
|
-
**kwargs
|
242
|
-
)
|
243
|
-
handle_response_errors(resp)
|
244
|
-
return resp.json()
|
245
|
-
except Exception as e:
|
246
|
-
raise ResourceNotFoundError(f"Failed to scan directory: {e}")
|
247
|
-
|
248
|
-
def get_scan_status(self, job_id: str, **kwargs) -> Dict[str, Any]:
|
249
|
-
url = f"{self.base_url}/adss/v1/images/scan-jobs/{job_id}"
|
250
|
-
headers = self.auth_manager._get_auth_headers()
|
251
|
-
|
252
|
-
try:
|
253
|
-
resp = self.auth_manager.request(
|
254
|
-
method="GET",
|
255
|
-
url=url,
|
256
|
-
headers=headers,
|
257
|
-
auth_required=False,
|
258
|
-
**kwargs
|
259
|
-
)
|
260
|
-
handle_response_errors(resp)
|
261
|
-
return resp.json()
|
262
|
-
except Exception as e:
|
263
|
-
raise ResourceNotFoundError(f"Failed to get scan job status: {e}")
|
264
|
-
|
265
167
|
|
266
168
|
class LuptonImagesEndpoint:
|
267
169
|
"""
|
@@ -301,7 +203,7 @@ class LuptonImagesEndpoint:
|
|
301
203
|
payload["size"] = size
|
302
204
|
|
303
205
|
try:
|
304
|
-
resp = self.auth_manager.
|
206
|
+
resp = self.auth_manager.download(
|
305
207
|
method="POST",
|
306
208
|
url=url,
|
307
209
|
headers=headers,
|
@@ -374,7 +276,7 @@ class LuptonImagesEndpoint:
|
|
374
276
|
payload["size"] = size
|
375
277
|
|
376
278
|
try:
|
377
|
-
resp = self.auth_manager.
|
279
|
+
resp = self.auth_manager.download(
|
378
280
|
method="POST",
|
379
281
|
url=url,
|
380
282
|
headers=headers,
|
@@ -421,7 +323,7 @@ class LuptonImagesEndpoint:
|
|
421
323
|
payload["pattern"] = pattern
|
422
324
|
|
423
325
|
try:
|
424
|
-
resp = self.auth_manager.
|
326
|
+
resp = self.auth_manager.download(
|
425
327
|
method="POST",
|
426
328
|
url=url,
|
427
329
|
headers=headers,
|
@@ -476,7 +378,7 @@ class LuptonImagesEndpoint:
|
|
476
378
|
payload["pattern"] = pattern
|
477
379
|
|
478
380
|
try:
|
479
|
-
resp = self.auth_manager.
|
381
|
+
resp = self.auth_manager.download(
|
480
382
|
method="POST",
|
481
383
|
url=url,
|
482
384
|
headers=headers,
|
@@ -531,7 +433,7 @@ class StampImagesEndpoint:
|
|
531
433
|
payload["zmax"] = zmax
|
532
434
|
|
533
435
|
try:
|
534
|
-
resp = self.auth_manager.
|
436
|
+
resp = self.auth_manager.download(
|
535
437
|
method="POST",
|
536
438
|
url=url,
|
537
439
|
headers=headers,
|
@@ -596,7 +498,7 @@ class StampImagesEndpoint:
|
|
596
498
|
payload["zmax"] = zmax
|
597
499
|
|
598
500
|
try:
|
599
|
-
resp = self.auth_manager.
|
501
|
+
resp = self.auth_manager.download(
|
600
502
|
method="POST",
|
601
503
|
url=url,
|
602
504
|
headers=headers,
|
@@ -646,7 +548,7 @@ class StampImagesEndpoint:
|
|
646
548
|
payload["pattern"] = pattern
|
647
549
|
|
648
550
|
try:
|
649
|
-
resp = self.auth_manager.
|
551
|
+
resp = self.auth_manager.download(
|
650
552
|
method="POST",
|
651
553
|
url=url,
|
652
554
|
headers=headers,
|
@@ -698,7 +600,7 @@ class StampImagesEndpoint:
|
|
698
600
|
payload["pattern"] = pattern
|
699
601
|
|
700
602
|
try:
|
701
|
-
resp = self.auth_manager.
|
603
|
+
resp = self.auth_manager.download(
|
702
604
|
method="POST",
|
703
605
|
url=url,
|
704
606
|
headers=headers,
|
@@ -763,7 +665,7 @@ class TrilogyImagesEndpoint:
|
|
763
665
|
payload["size"] = size
|
764
666
|
|
765
667
|
try:
|
766
|
-
resp = self.auth_manager.
|
668
|
+
resp = self.auth_manager.download(
|
767
669
|
method="POST",
|
768
670
|
url=url,
|
769
671
|
headers=headers,
|
@@ -812,7 +714,7 @@ class TrilogyImagesEndpoint:
|
|
812
714
|
payload["pattern"] = pattern
|
813
715
|
|
814
716
|
try:
|
815
|
-
resp = self.auth_manager.
|
717
|
+
resp = self.auth_manager.download(
|
816
718
|
method="POST",
|
817
719
|
url=url,
|
818
720
|
headers=headers,
|
@@ -868,7 +770,7 @@ class TrilogyImagesEndpoint:
|
|
868
770
|
payload["pattern"] = pattern
|
869
771
|
|
870
772
|
try:
|
871
|
-
resp = self.auth_manager.
|
773
|
+
resp = self.auth_manager.download(
|
872
774
|
method="POST",
|
873
775
|
url=url,
|
874
776
|
headers=headers,
|
{adss-1.29 → adss-1.30}/LICENSE
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|