anatools 5.1.23__py3-none-any.whl → 5.1.24__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__ = '5.1.23'
19
+ __version__ = '5.1.24'
@@ -46,10 +46,16 @@ def getVolumeData(self, volumeId, keys=[], dir=None, recursive=False, cursor=Non
46
46
  "cursor": cursor,
47
47
  "filters": filters
48
48
  },
49
- "query": f"""query
49
+ "query": f"""query
50
50
  getVolumeData($volumeId: String!, $keys: [String], $dir: String, $recursive: Boolean, $limit: Int, $cursor: String, $filters: VolumeDataFilter) {{
51
51
  getVolumeData(volumeId: $volumeId, keys: $keys, dir: $dir, recursive: $recursive, limit: $limit, cursor: $cursor, filters: $filters) {{
52
52
  keys {{{fields}}}
53
+ pageInfo {{
54
+ totalItems
55
+ cursor
56
+ offset
57
+ limit
58
+ }}
53
59
  }}
54
60
  }}"""})
55
61
  return self.errorhandler(response, "getVolumeData")
@@ -144,17 +144,17 @@ def get_volume_data(self, volumeId, files=None, dir=None, recursive=False, curso
144
144
  self.check_logout()
145
145
  if volumeId is None: raise Exception('The volumeId parameter is required!')
146
146
  if limit is not None and limit <= 100: items = limit
147
+ else: items = 100
147
148
  if files is None: files = []
148
149
  if dir is None: dir = ''
149
- if cursor is None: cursor = 0
150
- else: items = 100
151
150
  volumedata = []
152
151
  while True:
153
152
  if limit and len(volumedata) + items > limit: items = limit - len(volumedata)
154
- ret = self.ana_api.getVolumeData(volumeId=volumeId, keys=files, dir=dir, recursive=recursive, cursor=str(cursor), limit=limit)
155
- volumedata.extend(ret)
156
- if len(ret) < items or len(volumedata) == limit: break
157
- cursor += items
153
+ ret = self.ana_api.getVolumeData(volumeId=volumeId, keys=files, dir=dir, recursive=recursive, cursor=cursor, limit=items)
154
+ volumedata.extend(ret['keys'])
155
+ if len(ret['keys']) < items or len(volumedata) == limit: break
156
+ cursor = ret['pageInfo']['cursor'] if ret.get('pageInfo') and ret['pageInfo'].get('cursor') else None
157
+ if cursor is None: break
158
158
  return volumedata
159
159
 
160
160
 
@@ -321,6 +321,7 @@ try:
321
321
  if selection == str(options-2): remotechannel = create_channel(client=client, organization=remoteorganization, name=args.channel.split('/')[-1].split('.')[0], volumes=volumes)
322
322
  else:
323
323
  channels = sorted(client.get_channels(organizationId=remoteorganization['organizationId']), key=lambda x: x['name'].lower())
324
+ channels = [c for c in channels if c['organizationId'] == remoteorganization['organizationId']]
324
325
  if len(channels) > 0:
325
326
  print_color("Choose a channel to deploy to: ", color='brand')
326
327
  for i, channel in enumerate(channels):
@@ -480,6 +481,7 @@ try:
480
481
  if selection == str(options-2): remoteservice = create_service(client=client, organization=remoteorganization, name=localservice.name, volumes=volumes)
481
482
  else:
482
483
  services = sorted(client.get_services(organizationId=remoteorganization['organizationId']), key=lambda x: x['name'].lower())
484
+ services = [s for s in services if s['organizationId'] == remoteorganization['organizationId']]
483
485
  if len(services) > 0:
484
486
  print_color("Choose a service to deploy to: ", color='brand')
485
487
  for i, service in enumerate(services):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anatools
3
- Version: 5.1.23
3
+ Version: 5.1.24
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=oCvITQd3wdDEjbgafcqf2cV8z4u76klewKrwnoCrtUY,954
1
+ anatools/__init__.py,sha256=KVIC59BmwpX22GRK722YLUjO646VVk1kxz3YZBJrtYI,954
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=524-If_otuRAuwJtVRcQxL8G0wB-1i_DbgYoi_yePXI
22
22
  anatools/anaclient/rules.py,sha256=BA5KHLfyh4ddQYRdGmRwX-hGITL3GolMVzDuBX-hZno,3903
23
23
  anatools/anaclient/services.py,sha256=sRRdxM7ZEUfTDKU4700C9KcKsWY8AUTaw210pulwML4,18367
24
24
  anatools/anaclient/umap.py,sha256=Dy37yqoNb8HQWPmCh8ZqEIBMijSTqv9tcRcfO0_IXWQ,4144
25
- anatools/anaclient/volumes.py,sha256=f_4y7Xa7jMRRW0a2QeVReTqyIHTLs2m319_NanXsc0U,21346
25
+ anatools/anaclient/volumes.py,sha256=7NOBC1g_UV5miVLgaQ_LRgoyWiSWBvA-3381f0gVV6A,21442
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
@@ -46,7 +46,7 @@ anatools/anaclient/api/preview.py,sha256=OUN4MkYvC0HK6_3ZDxq7jayjPyJpxtgkHhEytmY
46
46
  anatools/anaclient/api/rules.py,sha256=yvxbk48m0ZZrWoHpmwS6kC4E2m7iSaY7iaLp0d6xmoc,4780
47
47
  anatools/anaclient/api/services.py,sha256=htSjiRz7-kiDivt-xl5wtCSBZPLjDrPjKMKVHcdAM_o,11459
48
48
  anatools/anaclient/api/umap.py,sha256=iMRE_z4Umg4-U_uEvdxho93QXOocF3-lN96qHfgbu64,3490
49
- anatools/anaclient/api/volumes.py,sha256=ZpNGIpO722HFyK2e2OkYO0di-D99-kgCduEYiE36r1Y,9356
49
+ anatools/anaclient/api/volumes.py,sha256=gOc-RPg7I988uKWk38w-DJIPM1Ltgby_wkrpwL_f-fE,9555
50
50
  anatools/anaclient/api/workspaces.py,sha256=kIXQAkznBGab38v5aaYcGwP1AnOp4PgID33lPMseRvA,8711
51
51
  anatools/anaclient/tests/__init__.py,sha256=uEOcjK2hof0s7RItreGywkCIULWxgcdKbI95JjrEGzk,104
52
52
  anatools/anaclient/tests/agents_test.py,sha256=dUrVzb4WmfAE_0Uu5V1zSdW4MUA4I1t1IfNgXTdP7rA,361
@@ -140,17 +140,17 @@ 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-5.1.23.data/scripts/ana,sha256=qe7LDHRgJRPyomzAumdcYy0D5SuaUVag0N8SVevpxcU,5739
144
- anatools-5.1.23.data/scripts/anadeploy,sha256=zmyxXblJBftJpyaCU2osRjFtNG0Lfc0C89f07I5baI0,37985
145
- anatools-5.1.23.data/scripts/anamount,sha256=AiaUgaaVVREFY2FLYRmSA8xgSwbfiF9NJYi91SWRA1I,6186
146
- anatools-5.1.23.data/scripts/anaprofile,sha256=1YUUwHiSa4ORQsxVf2HaSakayNTwMTNeF2snEMSJQAM,9779
147
- anatools-5.1.23.data/scripts/anarules,sha256=vT2V-77DoL-o6mApSMVXjqeXRIWm44X3jPXdcNK29N0,8972
148
- anatools-5.1.23.data/scripts/anaserver,sha256=QB1k_vhXAFGMOi9SNIFwgzkzN5LzJeVLtIVkp1oHq4I,8343
149
- anatools-5.1.23.data/scripts/anatransfer,sha256=GbMLjgA3TP4Oo2mbUxWnkkSC4nKpw1DWta-WVfcNftw,14564
150
- anatools-5.1.23.data/scripts/anautils,sha256=fziapZuKuBO0VKRgb4C4Js8p9zxxh8OHQmmkNdo3t3E,9530
151
- anatools-5.1.23.dist-info/licenses/LICENSE,sha256=aw0uaPvFzrHLJxBvuRqUcE2_srfM32-1suya9HbZCY8,1072
152
- anatools-5.1.23.dist-info/METADATA,sha256=hdvNRbuUCsV4PI-cX4v1wU8lDBGTLghohV8XJDFe4gw,8218
153
- anatools-5.1.23.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
154
- anatools-5.1.23.dist-info/entry_points.txt,sha256=KsZUmvbH3HXC2CdVpE2GZNR2u_cJNVIbm6BnD658FgM,54
155
- anatools-5.1.23.dist-info/top_level.txt,sha256=p7xa5bG7NX8pSMJOvRunSz1d7rGPGsBd5-A4gzD4r6w,9
156
- anatools-5.1.23.dist-info/RECORD,,
143
+ anatools-5.1.24.data/scripts/ana,sha256=qe7LDHRgJRPyomzAumdcYy0D5SuaUVag0N8SVevpxcU,5739
144
+ anatools-5.1.24.data/scripts/anadeploy,sha256=udgzz-NlSvJcnypfprFoS-wDad3QrPfZNIYeE1TsqRE,38217
145
+ anatools-5.1.24.data/scripts/anamount,sha256=AiaUgaaVVREFY2FLYRmSA8xgSwbfiF9NJYi91SWRA1I,6186
146
+ anatools-5.1.24.data/scripts/anaprofile,sha256=1YUUwHiSa4ORQsxVf2HaSakayNTwMTNeF2snEMSJQAM,9779
147
+ anatools-5.1.24.data/scripts/anarules,sha256=vT2V-77DoL-o6mApSMVXjqeXRIWm44X3jPXdcNK29N0,8972
148
+ anatools-5.1.24.data/scripts/anaserver,sha256=QB1k_vhXAFGMOi9SNIFwgzkzN5LzJeVLtIVkp1oHq4I,8343
149
+ anatools-5.1.24.data/scripts/anatransfer,sha256=GbMLjgA3TP4Oo2mbUxWnkkSC4nKpw1DWta-WVfcNftw,14564
150
+ anatools-5.1.24.data/scripts/anautils,sha256=fziapZuKuBO0VKRgb4C4Js8p9zxxh8OHQmmkNdo3t3E,9530
151
+ anatools-5.1.24.dist-info/licenses/LICENSE,sha256=aw0uaPvFzrHLJxBvuRqUcE2_srfM32-1suya9HbZCY8,1072
152
+ anatools-5.1.24.dist-info/METADATA,sha256=704ROOBSZ5RG7vb3wVfFjb1d9i86pNyleoeOqkYEoR8,8218
153
+ anatools-5.1.24.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
154
+ anatools-5.1.24.dist-info/entry_points.txt,sha256=KsZUmvbH3HXC2CdVpE2GZNR2u_cJNVIbm6BnD658FgM,54
155
+ anatools-5.1.24.dist-info/top_level.txt,sha256=p7xa5bG7NX8pSMJOvRunSz1d7rGPGsBd5-A4gzD4r6w,9
156
+ anatools-5.1.24.dist-info/RECORD,,