anatools 6.0.2__py3-none-any.whl → 6.0.3__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.
anatools/__init__.py CHANGED
@@ -16,4 +16,4 @@ View the `Introduction to Rendered.ai Documentation`_ to learn more.
16
16
  from .anaclient.anaclient import client
17
17
  from .annotations.annotations import annotations
18
18
 
19
- __version__ = '6.0.2'
19
+ __version__ = '6.0.3'
@@ -2,8 +2,15 @@
2
2
  Graphs API calls.
3
3
  """
4
4
 
5
+ GRAPH_DEFAULT_FIELDS = [
6
+ "graphId", "workspaceId", "name", "description",
7
+ "channel", "channelId", "readOnly", "showPreview", "previewId",
8
+ "createdBy", "createdAt", "updatedBy", "updatedAt",
9
+ "hash", "tags",
10
+ ]
11
+
5
12
  def getGraphs(self, workspaceId, graphId=None, name=None, email=None, staged=True, limit=100, cursor=None, filters={}, fields=None):
6
- if fields is None: fields = self.getTypeFields("Graph")
13
+ if fields is None: fields = GRAPH_DEFAULT_FIELDS
7
14
  fields = "\n".join(fields)
8
15
  if filters is None: filters = {}
9
16
  response = self.session.post(
@@ -2,16 +2,24 @@
2
2
  Services API calls.
3
3
  """
4
4
 
5
+ SERVICE_DEFAULT_FIELDS = [
6
+ "serviceId", "name", "sanitizedName", "description", "type",
7
+ "volumes", "instance", "version", "state", "tags",
8
+ "organizationId", "organization", "serviceType",
9
+ "persistentServiceId", "parentServiceId", "url",
10
+ "createdAt", "updatedAt", "createdBy", "updatedBy",
11
+ ]
12
+
5
13
  def getServiceTypes(self, fields=None):
6
14
  if fields is None: fields = self.getTypeFields("ServiceType")
7
15
  fields = "\n".join(fields)
8
16
  response = self.session.post(
9
- url = self.url,
10
- headers = self.headers,
17
+ url = self.url,
18
+ headers = self.headers,
11
19
  json = {
12
20
  "operationName": "getServiceTypes",
13
21
  "variables": {},
14
- "query": F"""query
22
+ "query": F"""query
15
23
  getServiceTypes {{
16
24
  getServiceTypes {{
17
25
  {fields}
@@ -21,7 +29,7 @@ def getServiceTypes(self, fields=None):
21
29
 
22
30
 
23
31
  def getServices(self, organizationId=None, workspaceId=None, serviceId=None, limit=100, cursor=None, filters={}, fields=None):
24
- if fields is None: fields = self.getTypeFields("Service")
32
+ if fields is None: fields = SERVICE_DEFAULT_FIELDS
25
33
  fields = "\n".join(fields)
26
34
  if filters is None: filters = {}
27
35
  response = self.session.post(
@@ -2,8 +2,14 @@
2
2
  Workspaces API calls.
3
3
  """
4
4
 
5
+ WORKSPACE_DEFAULT_FIELDS = [
6
+ "workspaceId", "name", "description", "objective",
7
+ "organizationId", "organization", "status", "tags",
8
+ "createdAt", "createdBy", "updatedAt", "updatedBy",
9
+ ]
10
+
5
11
  def getWorkspaces(self, organizationId=None, workspaceId=None, cursor=None, limit=100, filters={}, fields=None):
6
- if fields is None: fields = self.getTypeFields("Workspace")
12
+ if fields is None: fields = WORKSPACE_DEFAULT_FIELDS
7
13
  fields = "\n".join(fields)
8
14
  if filters is None: filters = {}
9
15
  response = self.session.post(
@@ -311,35 +311,42 @@ def upload_volume_data(self, volumeId, files=None, localDir=None, destinationDir
311
311
  if destinationDir: destinationDir += '/'
312
312
 
313
313
  source_files = []
314
+ source_paths = []
314
315
  source_hashes = []
315
316
  faileduploads = []
316
-
317
+
317
318
  if len(files):
318
319
  for file in files:
319
- filepath = os.path.join(localDir, file)
320
+ filepath = os.path.join(localDir, file) if not os.path.isabs(file) else file
320
321
  if os.path.isdir(filepath):
321
322
  for root, dirs, files in os.walk(filepath):
322
323
  for file in files:
323
- filepath = os.path.join(root, file).replace(localDir, '')
324
- source_files.append(filepath)
324
+ local_path = os.path.join(root, file)
325
+ relative_name = local_path.replace(localDir, '') if local_path.startswith(localDir) else os.path.relpath(local_path, localDir)
326
+ source_files.append(relative_name)
327
+ source_paths.append(local_path)
325
328
  if sync == True:
326
- file_hash = generate_etag(os.path.join(root,file))
327
- source_hashes.append(filepath + file_hash)
329
+ file_hash = generate_etag(local_path)
330
+ source_hashes.append(relative_name + file_hash)
328
331
  elif os.path.isfile(filepath):
329
- source_files.append(file)
332
+ upload_name = os.path.basename(file) if os.path.isabs(file) else file
333
+ source_files.append(upload_name)
334
+ source_paths.append(filepath)
330
335
  if sync == True:
331
336
  file_hash = generate_etag(filepath)
332
- source_hashes.append(file + file_hash)
337
+ source_hashes.append(upload_name + file_hash)
333
338
  else:
334
339
  if self.interactive: print(f"Could not find {filepath}.")
335
340
  else:
336
341
  for root, dirs, files in os.walk(localDir):
337
342
  for file in files:
338
- filepath = os.path.join(root, file).replace(localDir, '')
339
- source_files.append(filepath)
343
+ local_path = os.path.join(root, file)
344
+ relative_name = local_path.replace(localDir, '')
345
+ source_files.append(relative_name)
346
+ source_paths.append(local_path)
340
347
  if sync == True:
341
- file_hash = generate_etag(os.path.join(root,file))
342
- source_hashes.append(filepath + file_hash)
348
+ file_hash = generate_etag(local_path)
349
+ source_hashes.append(relative_name + file_hash)
343
350
 
344
351
  if sync == True:
345
352
  response = []
@@ -389,7 +396,7 @@ def upload_volume_data(self, volumeId, files=None, localDir=None, destinationDir
389
396
  elif sync == False or (source_hashes[index] not in destination_hashes):
390
397
  try:
391
398
  self.refresh_token()
392
- filepath = os.path.join(localDir, file)
399
+ filepath = source_paths[index]
393
400
  filesize = os.path.getsize(filepath)
394
401
  fileinfo = self.ana_api.uploadVolumeData(volumeId=volumeId, key=destination_key, size=filesize)
395
402
  parts = multipart_upload_file(filepath, int(fileinfo["partSize"]), fileinfo["urls"], f"Uploading {file} to the volume [{index+1} / {len(source_files)}]", interactive=self.interactive)
@@ -167,6 +167,7 @@ def cmd_workspaces_get(args):
167
167
  workspaceId=args.workspaceid,
168
168
  organizationId=args.orgid,
169
169
  limit=args.limit,
170
+ cursor=args.cursor,
170
171
  fields=parse_list_arg(args.fields) if args.fields else None
171
172
  )
172
173
  output_json(result)
@@ -225,6 +226,7 @@ def cmd_organizations_get(args):
225
226
  result = client.get_organizations(
226
227
  organizationId=args.orgid,
227
228
  limit=args.limit,
229
+ cursor=args.cursor,
228
230
  fields=parse_list_arg(args.fields) if args.fields else None
229
231
  )
230
232
  output_json(result)
@@ -242,6 +244,7 @@ def cmd_members_get(args):
242
244
  result = client.get_organization_members(
243
245
  organizationId=org_id,
244
246
  limit=args.limit,
247
+ cursor=args.cursor,
245
248
  fields=parse_list_arg(args.fields) if args.fields else None
246
249
  )
247
250
  output_json(result)
@@ -260,6 +263,7 @@ def cmd_datasets_get(args):
260
263
  workspaceId=workspace_id,
261
264
  datasetId=args.datasetid,
262
265
  limit=args.limit,
266
+ cursor=args.cursor,
263
267
  fields=parse_list_arg(args.fields) if args.fields else None
264
268
  )
265
269
  output_json(result)
@@ -329,6 +333,8 @@ def cmd_datasets_cancel(args):
329
333
 
330
334
  def cmd_datasets_download(args):
331
335
  """Download a dataset or a single file from a dataset."""
336
+ import zipfile
337
+
332
338
  client = get_client()
333
339
  workspace_id = require_arg(args, 'workspaceid', 'Workspace ID')
334
340
  dataset_id = require_arg(args, 'datasetid', 'Dataset ID')
@@ -347,7 +353,15 @@ def cmd_datasets_download(args):
347
353
  datasetId=dataset_id,
348
354
  localDir=args.outputdir
349
355
  )
350
- output_json({"downloadPath": result})
356
+
357
+ if args.extract and result and result.endswith('.zip') and os.path.isfile(result):
358
+ extract_dir = os.path.splitext(result)[0]
359
+ with zipfile.ZipFile(result, 'r') as zf:
360
+ zf.extractall(extract_dir)
361
+ os.remove(result)
362
+ output_json({"downloadPath": extract_dir, "extracted": True})
363
+ else:
364
+ output_json({"downloadPath": result})
351
365
 
352
366
 
353
367
  def cmd_datasets_upload(args):
@@ -406,7 +420,8 @@ def cmd_datasets_files(args):
406
420
  workspaceId=workspace_id,
407
421
  datasetId=dataset_id,
408
422
  path=args.path,
409
- limit=args.limit
423
+ limit=args.limit,
424
+ cursor=args.cursor
410
425
  )
411
426
  output_json(result)
412
427
 
@@ -420,6 +435,7 @@ def cmd_datasets_jobs(args):
420
435
  organizationId=args.orgid,
421
436
  datasetId=args.datasetid,
422
437
  limit=args.limit,
438
+ cursor=args.cursor,
423
439
  fields=parse_list_arg(args.fields) if args.fields else None
424
440
  )
425
441
  output_json(result)
@@ -456,6 +472,7 @@ def cmd_volumes_get(args):
456
472
  workspaceId=args.workspaceid,
457
473
  organizationId=args.orgid,
458
474
  limit=args.limit,
475
+ cursor=args.cursor,
459
476
  fields=parse_list_arg(args.fields) if args.fields else None
460
477
  )
461
478
  output_json(result)
@@ -514,7 +531,8 @@ def cmd_volume_data_get(args):
514
531
  dir=args.dir,
515
532
  files=parse_list_arg(args.files) if args.files else None,
516
533
  recursive=args.recursive,
517
- limit=args.limit
534
+ limit=args.limit,
535
+ cursor=args.cursor
518
536
  )
519
537
  output_json(result)
520
538
 
@@ -573,7 +591,8 @@ def cmd_volume_data_search(args):
573
591
  keywords=parse_list_arg(args.keywords) if args.keywords else None,
574
592
  fileformats=parse_list_arg(args.formats) if args.formats else None,
575
593
  filetypes=parse_list_arg(args.types) if args.types else None,
576
- limit=args.limit
594
+ limit=args.limit,
595
+ cursor=args.cursor
577
596
  )
578
597
  output_json(result)
579
598
 
@@ -986,6 +1005,7 @@ def cmd_graphs_get(args):
986
1005
  graphId=args.graphid,
987
1006
  staged=args.staged,
988
1007
  limit=args.limit,
1008
+ cursor=args.cursor,
989
1009
  fields=parse_list_arg(args.fields) if args.fields else None
990
1010
  )
991
1011
  output_json(result)
@@ -2239,6 +2259,7 @@ def cmd_channels_get(args):
2239
2259
  organizationId=args.orgid,
2240
2260
  channelId=args.channelid,
2241
2261
  limit=args.limit,
2262
+ cursor=args.cursor,
2242
2263
  fields=parse_list_arg(args.fields) if args.fields else None
2243
2264
  )
2244
2265
  output_json(result)
@@ -2371,6 +2392,7 @@ def cmd_services_get(args):
2371
2392
  organizationId=args.orgid,
2372
2393
  serviceId=args.serviceid,
2373
2394
  limit=args.limit,
2395
+ cursor=args.cursor,
2374
2396
  fields=parse_list_arg(args.fields) if args.fields else None
2375
2397
  )
2376
2398
  output_json(result)
@@ -2427,6 +2449,7 @@ def cmd_services_jobs(args):
2427
2449
  workspaceId=workspace_id,
2428
2450
  jobId=args.jobid,
2429
2451
  limit=args.limit,
2452
+ cursor=args.cursor,
2430
2453
  fields=parse_list_arg(args.fields) if args.fields else None
2431
2454
  )
2432
2455
  output_json(result)
@@ -2623,6 +2646,8 @@ def cmd_annotations_formats(args):
2623
2646
 
2624
2647
  def cmd_annotations_download(args):
2625
2648
  """Download an annotation."""
2649
+ import zipfile
2650
+
2626
2651
  client = get_client()
2627
2652
  workspace_id = require_arg(args, 'workspaceid', 'Workspace ID')
2628
2653
  annotation_id = require_arg(args, 'annotationid', 'Annotation ID')
@@ -2631,7 +2656,15 @@ def cmd_annotations_download(args):
2631
2656
  workspaceId=workspace_id,
2632
2657
  annotationId=annotation_id
2633
2658
  )
2634
- output_json({"downloadPath": result})
2659
+
2660
+ if args.extract and result and result.endswith('.zip') and os.path.isfile(result):
2661
+ extract_dir = os.path.splitext(result)[0]
2662
+ with zipfile.ZipFile(result, 'r') as zf:
2663
+ zf.extractall(extract_dir)
2664
+ os.remove(result)
2665
+ output_json({"downloadPath": extract_dir, "extracted": True})
2666
+ else:
2667
+ output_json({"downloadPath": result})
2635
2668
 
2636
2669
 
2637
2670
  def cmd_annotations_edit(args):
@@ -2824,6 +2857,7 @@ def cmd_gan_datasets_get(args):
2824
2857
  datasetId=args.datasetid,
2825
2858
  gandatasetId=args.gandatasetid,
2826
2859
  limit=args.limit,
2860
+ cursor=args.cursor,
2827
2861
  fields=parse_list_arg(args.fields) if args.fields else None
2828
2862
  )
2829
2863
  output_json(result)
@@ -2869,6 +2903,7 @@ def cmd_gan_models_get(args):
2869
2903
  workspaceId=args.workspaceid,
2870
2904
  modelId=args.modelid,
2871
2905
  limit=args.limit,
2906
+ cursor=args.cursor,
2872
2907
  fields=parse_list_arg(args.fields) if args.fields else None
2873
2908
  )
2874
2909
  output_json(result)
@@ -2917,6 +2952,7 @@ def cmd_umap_get(args):
2917
2952
  umapId=args.umapid,
2918
2953
  datasetId=args.datasetid,
2919
2954
  limit=args.limit,
2955
+ cursor=args.cursor,
2920
2956
  fields=parse_list_arg(args.fields) if args.fields else None
2921
2957
  )
2922
2958
  output_json(result)
@@ -2968,6 +3004,7 @@ def cmd_servers_get(args):
2968
3004
  workspaceId=args.workspaceid,
2969
3005
  serverId=args.serverid,
2970
3006
  limit=args.limit,
3007
+ cursor=args.cursor,
2971
3008
  fields=parse_list_arg(args.fields) if args.fields else None
2972
3009
  )
2973
3010
  output_json(result)
@@ -3037,6 +3074,7 @@ def cmd_ml_models_get(args):
3037
3074
  datasetId=args.datasetid,
3038
3075
  modelId=args.modelid,
3039
3076
  limit=args.limit,
3077
+ cursor=args.cursor,
3040
3078
  fields=parse_list_arg(args.fields) if args.fields else None
3041
3079
  )
3042
3080
  output_json(result)
@@ -3088,6 +3126,7 @@ def cmd_ml_inferences_get(args):
3088
3126
  datasetId=args.datasetid,
3089
3127
  modelId=args.modelid,
3090
3128
  limit=args.limit,
3129
+ cursor=args.cursor,
3091
3130
  fields=parse_list_arg(args.fields) if args.fields else None
3092
3131
  )
3093
3132
  output_json(result)
@@ -3123,6 +3162,7 @@ def cmd_inpaint_get(args):
3123
3162
  volumeId=volume_id,
3124
3163
  inpaintId=args.inpaintid,
3125
3164
  limit=args.limit,
3165
+ cursor=args.cursor,
3126
3166
  fields=parse_list_arg(args.fields) if args.fields else None
3127
3167
  )
3128
3168
  output_json(result)
@@ -3183,12 +3223,40 @@ def cmd_preview_get(args):
3183
3223
  workspace_id = require_arg(args, 'workspaceid', 'Workspace ID')
3184
3224
  preview_id = require_arg(args, 'previewid', 'Preview ID')
3185
3225
 
3186
- result = client.get_preview(
3187
- workspaceId=workspace_id,
3188
- previewId=preview_id,
3189
- fields=parse_list_arg(args.fields) if args.fields else None
3190
- )
3191
- output_json(result)
3226
+ if args.download:
3227
+ # Fetch preview with thumbnail and status fields for download
3228
+ fields = parse_list_arg(args.fields) if args.fields else None
3229
+ if fields is not None:
3230
+ for f in ['thumbnail', 'status']:
3231
+ if f not in fields:
3232
+ fields.append(f)
3233
+ result = client.get_preview(
3234
+ workspaceId=workspace_id,
3235
+ previewId=preview_id,
3236
+ fields=fields
3237
+ )
3238
+ status = result.get('status') if isinstance(result, dict) else None
3239
+ thumbnail = result.get('thumbnail') if isinstance(result, dict) else None
3240
+ if status != 'success':
3241
+ output_error(f"Preview is not complete (status: {status}). Cannot download.", "PREVIEW_NOT_READY")
3242
+ sys.exit(1)
3243
+ if not thumbnail:
3244
+ output_error("Preview has no thumbnail URL available.", "NO_THUMBNAIL")
3245
+ sys.exit(1)
3246
+ from anatools.lib.download import download_file
3247
+ # Derive filename from URL or use default
3248
+ from urllib.parse import urlparse
3249
+ url_path = urlparse(thumbnail).path
3250
+ fname = os.path.basename(url_path) if os.path.basename(url_path) else 'preview.png'
3251
+ download_path = download_file(url=thumbnail, fname=fname, localDir=args.outputdir)
3252
+ output_json({"downloadPath": download_path})
3253
+ else:
3254
+ result = client.get_preview(
3255
+ workspaceId=workspace_id,
3256
+ previewId=preview_id,
3257
+ fields=parse_list_arg(args.fields) if args.fields else None
3258
+ )
3259
+ output_json(result)
3192
3260
 
3193
3261
 
3194
3262
  def cmd_preview_create(args):
@@ -3358,7 +3426,8 @@ Examples:
3358
3426
  ws_get = workspaces_sub.add_parser('get', help='Get workspaces')
3359
3427
  ws_get.add_argument('--workspaceid', help='Filter by workspace ID')
3360
3428
  ws_get.add_argument('--orgid', help='Filter by organization ID')
3361
- ws_get.add_argument('--limit', type=int, help='Maximum results')
3429
+ ws_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
3430
+ ws_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
3362
3431
  ws_get.add_argument('--fields', help='Comma-separated fields to return')
3363
3432
  ws_get.set_defaults(func=cmd_workspaces_get)
3364
3433
 
@@ -3408,7 +3477,8 @@ Examples:
3408
3477
  # organizations get
3409
3478
  org_get = organizations_sub.add_parser('get', help='Get organizations')
3410
3479
  org_get.add_argument('--orgid', help='Filter by organization ID')
3411
- org_get.add_argument('--limit', type=int, help='Maximum results')
3480
+ org_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
3481
+ org_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
3412
3482
  org_get.add_argument('--fields', help='Comma-separated fields to return')
3413
3483
  org_get.set_defaults(func=cmd_organizations_get)
3414
3484
 
@@ -3421,7 +3491,8 @@ Examples:
3421
3491
  # members get
3422
3492
  members_get = members_sub.add_parser('get', help='Get organization members')
3423
3493
  members_get.add_argument('--orgid', required=True, help='Organization ID')
3424
- members_get.add_argument('--limit', type=int, help='Maximum results')
3494
+ members_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
3495
+ members_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
3425
3496
  members_get.add_argument('--fields', help='Comma-separated fields to return')
3426
3497
  members_get.set_defaults(func=cmd_members_get)
3427
3498
 
@@ -3435,7 +3506,8 @@ Examples:
3435
3506
  ds_get = datasets_sub.add_parser('get', help='Get datasets')
3436
3507
  ds_get.add_argument('--workspaceid', required=True, help='Workspace ID')
3437
3508
  ds_get.add_argument('--datasetid', help='Filter by dataset ID')
3438
- ds_get.add_argument('--limit', type=int, help='Maximum results')
3509
+ ds_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
3510
+ ds_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
3439
3511
  ds_get.add_argument('--fields', help='Comma-separated fields to return')
3440
3512
  ds_get.set_defaults(func=cmd_datasets_get)
3441
3513
 
@@ -3480,6 +3552,7 @@ Examples:
3480
3552
  ds_download.add_argument('--datasetid', required=True, help='Dataset ID')
3481
3553
  ds_download.add_argument('--filepath', help='Relative path to a specific file within the dataset (e.g., "images/000000-1-image.png"). If not provided, downloads the entire dataset.')
3482
3554
  ds_download.add_argument('--outputdir', help='Output directory')
3555
+ ds_download.add_argument('--extract', action='store_true', help='Extract the downloaded zip file and remove the archive')
3483
3556
  ds_download.set_defaults(func=cmd_datasets_download)
3484
3557
 
3485
3558
  # datasets upload
@@ -3511,7 +3584,8 @@ Examples:
3511
3584
  ds_files.add_argument('--workspaceid', required=True, help='Workspace ID')
3512
3585
  ds_files.add_argument('--datasetid', required=True, help='Dataset ID')
3513
3586
  ds_files.add_argument('--path', help='Path within dataset')
3514
- ds_files.add_argument('--limit', type=int, default=100, help='Maximum results')
3587
+ ds_files.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
3588
+ ds_files.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
3515
3589
  ds_files.set_defaults(func=cmd_datasets_files)
3516
3590
 
3517
3591
  # datasets jobs
@@ -3519,7 +3593,8 @@ Examples:
3519
3593
  ds_jobs.add_argument('--workspaceid', help='Workspace ID')
3520
3594
  ds_jobs.add_argument('--orgid', help='Organization ID')
3521
3595
  ds_jobs.add_argument('--datasetid', help='Filter by dataset ID')
3522
- ds_jobs.add_argument('--limit', type=int, help='Maximum results')
3596
+ ds_jobs.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
3597
+ ds_jobs.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
3523
3598
  ds_jobs.add_argument('--fields', help='Comma-separated fields to return')
3524
3599
  ds_jobs.set_defaults(func=cmd_datasets_jobs)
3525
3600
 
@@ -3544,7 +3619,8 @@ Examples:
3544
3619
  vol_get.add_argument('--volumeid', help='Filter by volume ID')
3545
3620
  vol_get.add_argument('--workspaceid', help='Filter by workspace ID')
3546
3621
  vol_get.add_argument('--orgid', help='Filter by organization ID')
3547
- vol_get.add_argument('--limit', type=int, help='Maximum results')
3622
+ vol_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
3623
+ vol_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
3548
3624
  vol_get.add_argument('--fields', help='Comma-separated fields to return')
3549
3625
  vol_get.set_defaults(func=cmd_volumes_get)
3550
3626
 
@@ -3595,7 +3671,8 @@ Examples:
3595
3671
  vd_get.add_argument('--dir', help='Directory path')
3596
3672
  vd_get.add_argument('--files', help='Comma-separated file paths')
3597
3673
  vd_get.add_argument('--recursive', action='store_true', help='Recursive listing')
3598
- vd_get.add_argument('--limit', type=int, help='Maximum results')
3674
+ vd_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
3675
+ vd_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
3599
3676
  vd_get.set_defaults(func=cmd_volume_data_get)
3600
3677
 
3601
3678
  # volume-data upload
@@ -3630,7 +3707,8 @@ Examples:
3630
3707
  vd_search.add_argument('--keywords', help='Comma-separated keywords')
3631
3708
  vd_search.add_argument('--formats', help='Comma-separated file formats (e.g., png,jpg)')
3632
3709
  vd_search.add_argument('--types', help='Comma-separated file types (e.g., Image,3D)')
3633
- vd_search.add_argument('--limit', type=int, help='Maximum results')
3710
+ vd_search.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
3711
+ vd_search.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
3634
3712
  vd_search.set_defaults(func=cmd_volume_data_search)
3635
3713
 
3636
3714
  # -------------------------------------------------------------------------
@@ -3644,7 +3722,8 @@ Examples:
3644
3722
  gr_get.add_argument('--workspaceid', required=True, help='Workspace ID')
3645
3723
  gr_get.add_argument('--graphid', help='Filter by graph ID')
3646
3724
  gr_get.add_argument('--staged', action='store_true', help='Only staged graphs')
3647
- gr_get.add_argument('--limit', type=int, help='Maximum results')
3725
+ gr_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
3726
+ gr_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
3648
3727
  gr_get.add_argument('--fields', help='Comma-separated fields to return')
3649
3728
  gr_get.set_defaults(func=cmd_graphs_get)
3650
3729
 
@@ -3850,7 +3929,8 @@ Examples:
3850
3929
  ch_get.add_argument('--workspaceid', help='Filter by workspace ID')
3851
3930
  ch_get.add_argument('--orgid', help='Filter by organization ID')
3852
3931
  ch_get.add_argument('--channelid', help='Filter by channel ID')
3853
- ch_get.add_argument('--limit', type=int, help='Maximum results')
3932
+ ch_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
3933
+ ch_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
3854
3934
  ch_get.add_argument('--fields', help='Comma-separated fields to return')
3855
3935
  ch_get.set_defaults(func=cmd_channels_get)
3856
3936
 
@@ -3900,7 +3980,8 @@ Examples:
3900
3980
  svc_get.add_argument('--workspaceid', help='Filter by workspace ID')
3901
3981
  svc_get.add_argument('--orgid', help='Filter by organization ID')
3902
3982
  svc_get.add_argument('--serviceid', help='Filter by service ID')
3903
- svc_get.add_argument('--limit', type=int, help='Maximum results')
3983
+ svc_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
3984
+ svc_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
3904
3985
  svc_get.add_argument('--fields', help='Comma-separated fields to return')
3905
3986
  svc_get.set_defaults(func=cmd_services_get)
3906
3987
 
@@ -3940,7 +4021,8 @@ Examples:
3940
4021
  svc_jobs_get = service_jobs_sub.add_parser('get', help='Get service jobs')
3941
4022
  svc_jobs_get.add_argument('--workspaceid', required=True, help='Workspace ID')
3942
4023
  svc_jobs_get.add_argument('--jobid', help='Filter by job ID')
3943
- svc_jobs_get.add_argument('--limit', type=int, help='Maximum results')
4024
+ svc_jobs_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
4025
+ svc_jobs_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
3944
4026
  svc_jobs_get.add_argument('--fields', help='Comma-separated fields to return')
3945
4027
  svc_jobs_get.set_defaults(func=cmd_services_jobs)
3946
4028
 
@@ -4042,6 +4124,7 @@ Examples:
4042
4124
  ann_download = annotations_sub.add_parser('download', help='Download an annotation')
4043
4125
  ann_download.add_argument('--workspaceid', required=True, help='Workspace ID')
4044
4126
  ann_download.add_argument('--annotationid', required=True, help='Annotation ID')
4127
+ ann_download.add_argument('--extract', action='store_true', help='Extract the downloaded zip file and remove the archive')
4045
4128
  ann_download.set_defaults(func=cmd_annotations_download)
4046
4129
 
4047
4130
  # annotations formats
@@ -4122,7 +4205,8 @@ Examples:
4122
4205
  gan_models_get.add_argument('--orgid', help='Organization ID')
4123
4206
  gan_models_get.add_argument('--workspaceid', help='Workspace ID')
4124
4207
  gan_models_get.add_argument('--modelid', help='Model ID')
4125
- gan_models_get.add_argument('--limit', type=int, help='Maximum results')
4208
+ gan_models_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
4209
+ gan_models_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
4126
4210
  gan_models_get.add_argument('--fields', help='Comma-separated fields')
4127
4211
  gan_models_get.set_defaults(func=cmd_gan_models_get)
4128
4212
 
@@ -4153,7 +4237,8 @@ Examples:
4153
4237
  gan_ds_get.add_argument('--workspaceid', required=True, help='Workspace ID')
4154
4238
  gan_ds_get.add_argument('--datasetid', help='Dataset ID')
4155
4239
  gan_ds_get.add_argument('--gandatasetid', help='GAN dataset ID')
4156
- gan_ds_get.add_argument('--limit', type=int, help='Maximum results')
4240
+ gan_ds_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
4241
+ gan_ds_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
4157
4242
  gan_ds_get.add_argument('--fields', help='Comma-separated fields')
4158
4243
  gan_ds_get.set_defaults(func=cmd_gan_datasets_get)
4159
4244
 
@@ -4184,7 +4269,8 @@ Examples:
4184
4269
  umap_get.add_argument('--workspaceid', required=True, help='Workspace ID')
4185
4270
  umap_get.add_argument('--umapid', help='UMAP ID')
4186
4271
  umap_get.add_argument('--datasetid', help='Dataset ID')
4187
- umap_get.add_argument('--limit', type=int, help='Maximum results')
4272
+ umap_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
4273
+ umap_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
4188
4274
  umap_get.add_argument('--fields', help='Comma-separated fields')
4189
4275
  umap_get.set_defaults(func=cmd_umap_get)
4190
4276
 
@@ -4216,7 +4302,8 @@ Examples:
4216
4302
  srv_get.add_argument('--orgid', help='Organization ID')
4217
4303
  srv_get.add_argument('--workspaceid', help='Workspace ID')
4218
4304
  srv_get.add_argument('--serverid', help='Server ID')
4219
- srv_get.add_argument('--limit', type=int, help='Maximum results')
4305
+ srv_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
4306
+ srv_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
4220
4307
  srv_get.add_argument('--fields', help='Comma-separated fields')
4221
4308
  srv_get.set_defaults(func=cmd_servers_get)
4222
4309
 
@@ -4259,7 +4346,8 @@ Examples:
4259
4346
  ml_models_get.add_argument('--workspaceid', required=True, help='Workspace ID')
4260
4347
  ml_models_get.add_argument('--datasetid', help='Dataset ID')
4261
4348
  ml_models_get.add_argument('--modelid', help='Model ID')
4262
- ml_models_get.add_argument('--limit', type=int, help='Maximum results')
4349
+ ml_models_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
4350
+ ml_models_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
4263
4351
  ml_models_get.add_argument('--fields', help='Comma-separated fields')
4264
4352
  ml_models_get.set_defaults(func=cmd_ml_models_get)
4265
4353
 
@@ -4294,7 +4382,8 @@ Examples:
4294
4382
  ml_inf_get.add_argument('--inferenceid', help='Inference ID')
4295
4383
  ml_inf_get.add_argument('--datasetid', help='Dataset ID')
4296
4384
  ml_inf_get.add_argument('--modelid', help='Model ID')
4297
- ml_inf_get.add_argument('--limit', type=int, help='Maximum results')
4385
+ ml_inf_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
4386
+ ml_inf_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
4298
4387
  ml_inf_get.add_argument('--fields', help='Comma-separated fields')
4299
4388
  ml_inf_get.set_defaults(func=cmd_ml_inferences_get)
4300
4389
 
@@ -4317,7 +4406,8 @@ Examples:
4317
4406
  inp_get = inpaint_sub.add_parser('get', help='Get inpaint jobs')
4318
4407
  inp_get.add_argument('--volumeid', required=True, help='Volume ID')
4319
4408
  inp_get.add_argument('--inpaintid', help='Inpaint ID')
4320
- inp_get.add_argument('--limit', type=int, help='Maximum results')
4409
+ inp_get.add_argument('--limit', type=int, default=50, help='Maximum results (default: 50)')
4410
+ inp_get.add_argument('--cursor', help='Cursor for pagination (use last item ID from previous page)')
4321
4411
  inp_get.add_argument('--fields', help='Comma-separated fields')
4322
4412
  inp_get.set_defaults(func=cmd_inpaint_get)
4323
4413
 
@@ -4356,6 +4446,8 @@ Examples:
4356
4446
  prv_get.add_argument('--workspaceid', required=True, help='Workspace ID')
4357
4447
  prv_get.add_argument('--previewid', required=True, help='Preview ID')
4358
4448
  prv_get.add_argument('--fields', help='Comma-separated fields')
4449
+ prv_get.add_argument('--download', action='store_true', help='Download the preview thumbnail image')
4450
+ prv_get.add_argument('--outputdir', help='Output directory for downloaded preview (default: current directory)')
4359
4451
  prv_get.set_defaults(func=cmd_preview_get)
4360
4452
 
4361
4453
  # preview create
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anatools
3
- Version: 6.0.2
3
+ Version: 6.0.3
4
4
  Summary: Tools for development with the Rendered.ai Platform.
5
5
  Home-page: https://rendered.ai
6
6
  Author: Rendered AI, Inc
@@ -1,4 +1,4 @@
1
- anatools/__init__.py,sha256=oRyTj8OARogJ21SdosiOWxpYkQ8RGuINWDzlOOBS09Y,953
1
+ anatools/__init__.py,sha256=xGWbpdZjlPwKZgGMPQa6Kv_B9jQQ_Y6BbmVK8wHGovM,953
2
2
  anatools/anacreate.py,sha256=wK1GKxGSzFdeQtqBkGhpai1sFjSJaKZ2686zrVJPBd0,5622
3
3
  anatools/anaclient/__init__.py,sha256=tjCd-MMkWOjhjY1mlbGtHNhEdHLj-W687GiYJHsf_J0,50
4
4
  anatools/anaclient/_menu.py,sha256=WSD8h7_SPRq9F6I0ohzkA4L0aLUx7L9YtIihk9eiD_o,5965
@@ -22,7 +22,7 @@ anatools/anaclient/preview.py,sha256=wT5sdKEr-9SNHmQeEyHN4czR1hrXuJJEMllFvXJF2z0
22
22
  anatools/anaclient/rules.py,sha256=BA5KHLfyh4ddQYRdGmRwX-hGITL3GolMVzDuBX-hZno,3903
23
23
  anatools/anaclient/services.py,sha256=GAHGwxJtD3bcniJTVL0ROgnDg8PK8Paf1cRUz5AbEQA,19887
24
24
  anatools/anaclient/umap.py,sha256=Dy37yqoNb8HQWPmCh8ZqEIBMijSTqv9tcRcfO0_IXWQ,4144
25
- anatools/anaclient/volumes.py,sha256=-0TegIxOTpIrR8qBESXvdyA0JktxO_WvHPkUj7XVoE4,21583
25
+ anatools/anaclient/volumes.py,sha256=pLxnDSmDVFC_3URjCKE1zoh09oZcp45btBlET8NVhwU,22045
26
26
  anatools/anaclient/workspaces.py,sha256=4aUBfqfW7jzlb6P55LcA0IHmZoNzIWej9tL0DY2pNog,7956
27
27
  anatools/anaclient/api/__init__.py,sha256=SrGDhIFobFBhOlE-hOtnJvdrnBAuypG-Im_oyzSPa3E,39
28
28
  anatools/anaclient/api/analytics.py,sha256=AFeJj_pl1h70oki5teFDGYRgPIOwHn7yJB-TYNouZsc,3666
@@ -33,7 +33,7 @@ anatools/anaclient/api/channels.py,sha256=ijXf51PKKHFSatInZaNvIR1LMsQeRpcoEJf00b
33
33
  anatools/anaclient/api/datasets.py,sha256=auC4goHBTf5uHLvpqUzDdAvjhM-EFUeYzzhIrnSlUhc,12214
34
34
  anatools/anaclient/api/editor.py,sha256=TDwE9G0PLhp0jv6mUnrwpAyHpS0LPce-1NauM40mPRU,10112
35
35
  anatools/anaclient/api/gan.py,sha256=iAU7ibfqprGj4bMTkUAuji1Z9QzfW1uy-Htinknk-Co,7229
36
- anatools/anaclient/api/graphs.py,sha256=Wnxiz3u28rYeOV6OdEyi6NFuQDZdCOfOo8jNgZNX_Ok,5416
36
+ anatools/anaclient/api/graphs.py,sha256=YQlvFY7xcIVwWPubnOuVsTVJKeh_ncDfhRhQY_kar6A,5634
37
37
  anatools/anaclient/api/handlers.py,sha256=FMwLLAloJLv6P3YwkoNwTBKVzrRMiH8r0vrBvESCc9s,1430
38
38
  anatools/anaclient/api/image.py,sha256=40NXtSPgQ7Xa_LNKn9vQ8uHeQUE9otq0hFDQYYq0V74,2630
39
39
  anatools/anaclient/api/inpaint.py,sha256=F09IdIX3gtyGGTOEfRX8JCU0TL5cw88mir7XEFMrUCA,3352
@@ -44,10 +44,10 @@ anatools/anaclient/api/ml.py,sha256=Jv_kFknGR8rj8xxjnnSrqPcCuyHO6KOJ9EeBh06r4as,
44
44
  anatools/anaclient/api/organizations.py,sha256=FCXdJORKEnZlsPd3K4WCxBOsCayBd7tZ6sXxNihRLfM,1509
45
45
  anatools/anaclient/api/preview.py,sha256=ipgU0eVRr49KHsqaAK3Edq8oqx8jMjF8jlxYR5-b6p8,2140
46
46
  anatools/anaclient/api/rules.py,sha256=yvxbk48m0ZZrWoHpmwS6kC4E2m7iSaY7iaLp0d6xmoc,4780
47
- anatools/anaclient/api/services.py,sha256=htSjiRz7-kiDivt-xl5wtCSBZPLjDrPjKMKVHcdAM_o,11459
47
+ anatools/anaclient/api/services.py,sha256=6dLDaYuDBfETYfDLMG2S6-WVY_ZwNVtCaBQZlakps3I,11761
48
48
  anatools/anaclient/api/umap.py,sha256=iMRE_z4Umg4-U_uEvdxho93QXOocF3-lN96qHfgbu64,3490
49
49
  anatools/anaclient/api/volumes.py,sha256=gOc-RPg7I988uKWk38w-DJIPM1Ltgby_wkrpwL_f-fE,9555
50
- anatools/anaclient/api/workspaces.py,sha256=kIXQAkznBGab38v5aaYcGwP1AnOp4PgID33lPMseRvA,8711
50
+ anatools/anaclient/api/workspaces.py,sha256=rBRy2Ar5lF3nt7VjBbDQWAscpECm-cLwTBIZbgjSqKg,8903
51
51
  anatools/anaclient/tests/__init__.py,sha256=uEOcjK2hof0s7RItreGywkCIULWxgcdKbI95JjrEGzk,104
52
52
  anatools/anaclient/tests/agents_test.py,sha256=dUrVzb4WmfAE_0Uu5V1zSdW4MUA4I1t1IfNgXTdP7rA,361
53
53
  anatools/anaclient/tests/anaclient_test.py,sha256=U3RDbtD_A-zwxDJbaucQrOLAY_tEd1631gnR1A-73Z4,723
@@ -140,18 +140,18 @@ anatools/nodes/volume_directory.py,sha256=oe721h7qOplRj6N6NpGuyY1HCM277NSYA-6Uo3
140
140
  anatools/nodes/volume_directory.yml,sha256=MbyuLUlcqWIlQadYcn4Rvf6roypqh5IiP3dP57TilbY,901
141
141
  anatools/nodes/volume_file.py,sha256=YA4zCyRvVzF_9mMefGx29JLE7o9i6-NPaC40BFGv4_c,557
142
142
  anatools/nodes/volume_file.yml,sha256=i8bo9QeQmTLeWjv9Rh4EDoDqwOBULNPV7SMLO5AK8DI,862
143
- anatools-6.0.2.data/scripts/ana,sha256=qe7LDHRgJRPyomzAumdcYy0D5SuaUVag0N8SVevpxcU,5739
144
- anatools-6.0.2.data/scripts/anadeploy,sha256=8A3JAJDztq_wf0EFJf_BgLBpikUwzaDJr2afsX2IAHk,38720
145
- anatools-6.0.2.data/scripts/anamount,sha256=AiaUgaaVVREFY2FLYRmSA8xgSwbfiF9NJYi91SWRA1I,6186
146
- anatools-6.0.2.data/scripts/anaprofile,sha256=1YUUwHiSa4ORQsxVf2HaSakayNTwMTNeF2snEMSJQAM,9779
147
- anatools-6.0.2.data/scripts/anarules,sha256=FDHAiEqSELiEUAYyulRMmgN_WI6fD1tyo34SVjjg8Eo,9117
148
- anatools-6.0.2.data/scripts/anaserver,sha256=QB1k_vhXAFGMOi9SNIFwgzkzN5LzJeVLtIVkp1oHq4I,8343
149
- anatools-6.0.2.data/scripts/anatransfer,sha256=GbMLjgA3TP4Oo2mbUxWnkkSC4nKpw1DWta-WVfcNftw,14564
150
- anatools-6.0.2.data/scripts/anautils,sha256=fziapZuKuBO0VKRgb4C4Js8p9zxxh8OHQmmkNdo3t3E,9530
151
- anatools-6.0.2.data/scripts/renderedai,sha256=qM8GraquQgPlacIlGfnT_Ia86418BJ_k2XymN_hbfq0,169196
152
- anatools-6.0.2.dist-info/licenses/LICENSE,sha256=aw0uaPvFzrHLJxBvuRqUcE2_srfM32-1suya9HbZCY8,1072
153
- anatools-6.0.2.dist-info/METADATA,sha256=mFdurueuJbirRpf0N9lnagRLQkvF8xwseVrnTDWVSpA,8232
154
- anatools-6.0.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
155
- anatools-6.0.2.dist-info/entry_points.txt,sha256=KsZUmvbH3HXC2CdVpE2GZNR2u_cJNVIbm6BnD658FgM,54
156
- anatools-6.0.2.dist-info/top_level.txt,sha256=p7xa5bG7NX8pSMJOvRunSz1d7rGPGsBd5-A4gzD4r6w,9
157
- anatools-6.0.2.dist-info/RECORD,,
143
+ anatools-6.0.3.data/scripts/ana,sha256=qe7LDHRgJRPyomzAumdcYy0D5SuaUVag0N8SVevpxcU,5739
144
+ anatools-6.0.3.data/scripts/anadeploy,sha256=8A3JAJDztq_wf0EFJf_BgLBpikUwzaDJr2afsX2IAHk,38720
145
+ anatools-6.0.3.data/scripts/anamount,sha256=AiaUgaaVVREFY2FLYRmSA8xgSwbfiF9NJYi91SWRA1I,6186
146
+ anatools-6.0.3.data/scripts/anaprofile,sha256=1YUUwHiSa4ORQsxVf2HaSakayNTwMTNeF2snEMSJQAM,9779
147
+ anatools-6.0.3.data/scripts/anarules,sha256=FDHAiEqSELiEUAYyulRMmgN_WI6fD1tyo34SVjjg8Eo,9117
148
+ anatools-6.0.3.data/scripts/anaserver,sha256=QB1k_vhXAFGMOi9SNIFwgzkzN5LzJeVLtIVkp1oHq4I,8343
149
+ anatools-6.0.3.data/scripts/anatransfer,sha256=GbMLjgA3TP4Oo2mbUxWnkkSC4nKpw1DWta-WVfcNftw,14564
150
+ anatools-6.0.3.data/scripts/anautils,sha256=fziapZuKuBO0VKRgb4C4Js8p9zxxh8OHQmmkNdo3t3E,9530
151
+ anatools-6.0.3.data/scripts/renderedai,sha256=JM9NlgkI0MDmuCaXtp2x1wuQKgVuya7SVMJJ1mE6IcA,174955
152
+ anatools-6.0.3.dist-info/licenses/LICENSE,sha256=aw0uaPvFzrHLJxBvuRqUcE2_srfM32-1suya9HbZCY8,1072
153
+ anatools-6.0.3.dist-info/METADATA,sha256=7yFTKiy9uCXv_j_DA-Z3ZX2ANY0JLAbsxWeZd0cqkjw,8232
154
+ anatools-6.0.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
155
+ anatools-6.0.3.dist-info/entry_points.txt,sha256=KsZUmvbH3HXC2CdVpE2GZNR2u_cJNVIbm6BnD658FgM,54
156
+ anatools-6.0.3.dist-info/top_level.txt,sha256=p7xa5bG7NX8pSMJOvRunSz1d7rGPGsBd5-A4gzD4r6w,9
157
+ anatools-6.0.3.dist-info/RECORD,,
File without changes