adss 1.29__py3-none-any.whl → 1.30__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.
adss/endpoints/images.py CHANGED
@@ -25,7 +25,7 @@ class ImagesEndpoint:
25
25
  params = {"skip": skip, "limit": limit}
26
26
 
27
27
  try:
28
- resp = self.auth_manager.request(
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.request(
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.request(
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.request(
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.request(
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.request(
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.request(
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.request(
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.request(
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.request(
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.request(
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.request(
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.request(
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.request(
773
+ resp = self.auth_manager.download(
872
774
  method="POST",
873
775
  url=url,
874
776
  headers=headers,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: adss
3
- Version: 1.29
3
+ Version: 1.30
4
4
  Summary: Astronomical Data Smart System
5
5
  Author-email: Gustavo Schwarz <gustavo.b.schwarz@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/schwarzam/adss
@@ -5,7 +5,7 @@ adss/exceptions.py,sha256=YeN-xRHvlSmwyS8ni2jOEhhgZK9J1jsG11pOedy3Gfg,1482
5
5
  adss/utils.py,sha256=KeQUtTCcye3W07oHpBnwS7g3gG-RqwWMlaE7UgDWwsU,3557
6
6
  adss/endpoints/__init__.py,sha256=Pr29901fT8ClCS2GasTjTiBNyn7DfVfxILpYDFsMvPA,488
7
7
  adss/endpoints/admin.py,sha256=S6ZrkeA_Lh_LCpF1NHyfMKqjbIiylYXUSV65H_WKg1U,16391
8
- adss/endpoints/images.py,sha256=r6YvRo6feAXKd_quK_UQPKe3OSRsDaPr3UHDZ0Cab0I,35588
8
+ adss/endpoints/images.py,sha256=mpFY6t_d-_zKHLapNZNpCb-XZGxsD3VeqmNan0-yDYQ,31911
9
9
  adss/endpoints/metadata.py,sha256=RPrRP6Uz6-uPMIcntMgfss9vAd5iN7JXjZbF8SW0EYg,8238
10
10
  adss/endpoints/queries.py,sha256=du4C_K8870ffyZkaLnMD08jMAWeVBygdk_bjgnEEMWM,17633
11
11
  adss/endpoints/users.py,sha256=6Abkl3c3_YKdMYR_JWI-uL9HTHxcjlIOnE29GyN5_QE,10811
@@ -13,9 +13,9 @@ adss/models/__init__.py,sha256=ADWVaGy4dkpEMH3iS_6EnRSBlEgoM5Vy9zORQr-UG6w,404
13
13
  adss/models/metadata.py,sha256=6fdH_0BenVRmeXkkKbsG2B68O-N2FXTTRgxsEhAHRoU,4058
14
14
  adss/models/query.py,sha256=Mh7f7pE-YNw58By68CfV-aJ45bPpsurEQeAEhs0CYoM,4308
15
15
  adss/models/user.py,sha256=5qVT5qOktokmVLkGszPGCTZWv0wC-7aBMvJ8EeBOqdw,3493
16
- adss-1.29.dist-info/licenses/LICENSE,sha256=yPw116pnd1J4TuMPnvm6I_irZUyC30EoBZ4BtWFAL7I,1557
16
+ adss-1.30.dist-info/licenses/LICENSE,sha256=yPw116pnd1J4TuMPnvm6I_irZUyC30EoBZ4BtWFAL7I,1557
17
17
  dev/fetch_idr6.py,sha256=b6FrHPr-ZLaDup_wLOaQWP2fK254Sr3YNHbTxuUt088,12788
18
- adss-1.29.dist-info/METADATA,sha256=Fn17y4MlYc3_1mE4MqoDVAhDFYgS7mms5CslsppfOR8,1043
19
- adss-1.29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
- adss-1.29.dist-info/top_level.txt,sha256=NT2zObOOiTWXc0yowpEjT6BiiI1e7WXlXd0ZoK7T5hk,9
21
- adss-1.29.dist-info/RECORD,,
18
+ adss-1.30.dist-info/METADATA,sha256=hI7jo9FKttoNpQOWB7U1oQI-zo6FD3A4mWZGCqlXB-M,1043
19
+ adss-1.30.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
+ adss-1.30.dist-info/top_level.txt,sha256=NT2zObOOiTWXc0yowpEjT6BiiI1e7WXlXd0ZoK7T5hk,9
21
+ adss-1.30.dist-info/RECORD,,
File without changes