Ayon-Python-Api 0.3.3__tar.gz → 0.3.5__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.
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/PKG-INFO +2 -3
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/README.md +1 -2
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_api/__init__.py +22 -0
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_api/_api.py +62 -0
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_api/constants.py +19 -0
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_api/entity_hub.py +744 -4
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_api/graphql_queries.py +25 -0
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_api/operations.py +93 -24
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_api/server_api.py +315 -101
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_api/utils.py +39 -0
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_api/version.py +1 -1
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_python_api.egg-info/PKG-INFO +2 -3
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_python_api.egg-info/SOURCES.txt +0 -1
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/pyproject.toml +1 -1
- ayon-python-api-0.3.3/ayon_api/thumbnails.py +0 -219
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/LICENSE +0 -0
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_api/events.py +0 -0
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_api/exceptions.py +0 -0
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_api/graphql.py +0 -0
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_python_api.egg-info/dependency_links.txt +0 -0
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_python_api.egg-info/requires.txt +0 -0
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/ayon_python_api.egg-info/top_level.txt +0 -0
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/setup.cfg +0 -0
- {ayon-python-api-0.3.3 → ayon-python-api-0.3.5}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ayon-python-api
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Summary: AYON Python API
|
|
5
5
|
Home-page: https://github.com/ynput/ayon-python-api
|
|
6
6
|
Author: ynput.io
|
|
@@ -273,8 +273,7 @@ If pip complain that `ayon-python-api` is already installed just uninstall exist
|
|
|
273
273
|
- Move entity hub to first place
|
|
274
274
|
- Skip those which are invalid for the entity and fake it for base or remove it from base
|
|
275
275
|
- Entity hub should use operations session to do changes
|
|
276
|
-
- Entity hub could also handle '
|
|
277
|
-
- Missing 'statuses' on project
|
|
276
|
+
- Entity hub could also handle 'product', 'version' and 'representation' entities
|
|
278
277
|
- Missing 'status' on folders
|
|
279
278
|
- Missing assignees on tasks
|
|
280
279
|
- Pass docstrings and arguments definitions from `ServerAPI` methods to global functions
|
|
@@ -54,8 +54,7 @@ If pip complain that `ayon-python-api` is already installed just uninstall exist
|
|
|
54
54
|
- Move entity hub to first place
|
|
55
55
|
- Skip those which are invalid for the entity and fake it for base or remove it from base
|
|
56
56
|
- Entity hub should use operations session to do changes
|
|
57
|
-
- Entity hub could also handle '
|
|
58
|
-
- Missing 'statuses' on project
|
|
57
|
+
- Entity hub could also handle 'product', 'version' and 'representation' entities
|
|
59
58
|
- Missing 'status' on folders
|
|
60
59
|
- Missing assignees on tasks
|
|
61
60
|
- Pass docstrings and arguments definitions from `ServerAPI` methods to global functions
|
|
@@ -30,6 +30,8 @@ from ._api import (
|
|
|
30
30
|
set_client_version,
|
|
31
31
|
get_default_settings_variant,
|
|
32
32
|
set_default_settings_variant,
|
|
33
|
+
get_sender,
|
|
34
|
+
set_sender,
|
|
33
35
|
|
|
34
36
|
get_base_url,
|
|
35
37
|
get_rest_url,
|
|
@@ -92,6 +94,7 @@ from ._api import (
|
|
|
92
94
|
get_users,
|
|
93
95
|
|
|
94
96
|
get_attributes_for_type,
|
|
97
|
+
get_attributes_fields_for_type,
|
|
95
98
|
get_default_fields_for_type,
|
|
96
99
|
|
|
97
100
|
get_project_anatomy_preset,
|
|
@@ -110,6 +113,11 @@ from ._api import (
|
|
|
110
113
|
get_addons_project_settings,
|
|
111
114
|
get_addons_settings,
|
|
112
115
|
|
|
116
|
+
get_secrets,
|
|
117
|
+
get_secret,
|
|
118
|
+
save_secret,
|
|
119
|
+
delete_secret,
|
|
120
|
+
|
|
113
121
|
get_project_names,
|
|
114
122
|
get_projects,
|
|
115
123
|
get_project,
|
|
@@ -124,6 +132,8 @@ from ._api import (
|
|
|
124
132
|
get_folders_hierarchy,
|
|
125
133
|
|
|
126
134
|
get_tasks,
|
|
135
|
+
get_task_by_id,
|
|
136
|
+
get_task_by_name,
|
|
127
137
|
|
|
128
138
|
get_folder_ids_with_products,
|
|
129
139
|
get_product_by_id,
|
|
@@ -154,6 +164,7 @@ from ._api import (
|
|
|
154
164
|
get_workfile_info,
|
|
155
165
|
get_workfile_info_by_id,
|
|
156
166
|
|
|
167
|
+
get_thumbnail_by_id,
|
|
157
168
|
get_thumbnail,
|
|
158
169
|
get_folder_thumbnail,
|
|
159
170
|
get_version_thumbnail,
|
|
@@ -216,6 +227,8 @@ __all__ = (
|
|
|
216
227
|
"set_client_version",
|
|
217
228
|
"get_default_settings_variant",
|
|
218
229
|
"set_default_settings_variant",
|
|
230
|
+
"get_sender",
|
|
231
|
+
"set_sender",
|
|
219
232
|
|
|
220
233
|
"get_base_url",
|
|
221
234
|
"get_rest_url",
|
|
@@ -278,6 +291,7 @@ __all__ = (
|
|
|
278
291
|
"get_users",
|
|
279
292
|
|
|
280
293
|
"get_attributes_for_type",
|
|
294
|
+
"get_attributes_fields_for_type",
|
|
281
295
|
"get_default_fields_for_type",
|
|
282
296
|
|
|
283
297
|
"get_project_anatomy_preset",
|
|
@@ -295,6 +309,11 @@ __all__ = (
|
|
|
295
309
|
"get_addons_project_settings",
|
|
296
310
|
"get_addons_settings",
|
|
297
311
|
|
|
312
|
+
"get_secrets",
|
|
313
|
+
"get_secret",
|
|
314
|
+
"save_secret",
|
|
315
|
+
"delete_secret",
|
|
316
|
+
|
|
298
317
|
"get_project_names",
|
|
299
318
|
"get_projects",
|
|
300
319
|
"get_project",
|
|
@@ -308,6 +327,8 @@ __all__ = (
|
|
|
308
327
|
"get_folders",
|
|
309
328
|
|
|
310
329
|
"get_tasks",
|
|
330
|
+
"get_task_by_id",
|
|
331
|
+
"get_task_by_name",
|
|
311
332
|
|
|
312
333
|
"get_folder_ids_with_products",
|
|
313
334
|
"get_product_by_id",
|
|
@@ -338,6 +359,7 @@ __all__ = (
|
|
|
338
359
|
"get_workfile_info",
|
|
339
360
|
"get_workfile_info_by_id",
|
|
340
361
|
|
|
362
|
+
"get_thumbnail_by_id",
|
|
341
363
|
"get_thumbnail",
|
|
342
364
|
"get_folder_thumbnail",
|
|
343
365
|
"get_version_thumbnail",
|
|
@@ -392,6 +392,28 @@ def set_default_settings_variant(variant):
|
|
|
392
392
|
return con.set_default_settings_variant(variant)
|
|
393
393
|
|
|
394
394
|
|
|
395
|
+
def get_sender():
|
|
396
|
+
"""Sender used to send requests.
|
|
397
|
+
|
|
398
|
+
Returns:
|
|
399
|
+
Union[str, None]: Sender name or None.
|
|
400
|
+
"""
|
|
401
|
+
|
|
402
|
+
con = get_server_api_connection()
|
|
403
|
+
return con.get_sender()
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
def set_sender(sender):
|
|
407
|
+
"""Change sender used for requests.
|
|
408
|
+
|
|
409
|
+
Args:
|
|
410
|
+
sender (Union[str, None]): Sender name or None.
|
|
411
|
+
"""
|
|
412
|
+
|
|
413
|
+
con = get_server_api_connection()
|
|
414
|
+
return con.set_sender(sender)
|
|
415
|
+
|
|
416
|
+
|
|
395
417
|
def get_base_url():
|
|
396
418
|
con = get_server_api_connection()
|
|
397
419
|
return con.get_base_url()
|
|
@@ -704,6 +726,26 @@ def get_addons_settings(*args, **kwargs):
|
|
|
704
726
|
return con.get_addons_settings(*args, **kwargs)
|
|
705
727
|
|
|
706
728
|
|
|
729
|
+
def get_secrets(*args, **kwargs):
|
|
730
|
+
con = get_server_api_connection()
|
|
731
|
+
return con.get_secrets(*args, **kwargs)
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
def get_secret(*args, **kwargs):
|
|
735
|
+
con = get_server_api_connection()
|
|
736
|
+
return con.delete_secret(*args, **kwargs)
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
def save_secret(*args, **kwargs):
|
|
740
|
+
con = get_server_api_connection()
|
|
741
|
+
return con.delete_secret(*args, **kwargs)
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
def delete_secret(*args, **kwargs):
|
|
745
|
+
con = get_server_api_connection()
|
|
746
|
+
return con.delete_secret(*args, **kwargs)
|
|
747
|
+
|
|
748
|
+
|
|
707
749
|
def get_project_names(*args, **kwargs):
|
|
708
750
|
con = get_server_api_connection()
|
|
709
751
|
return con.get_project_names(*args, **kwargs)
|
|
@@ -734,6 +776,16 @@ def get_tasks(*args, **kwargs):
|
|
|
734
776
|
return con.get_tasks(*args, **kwargs)
|
|
735
777
|
|
|
736
778
|
|
|
779
|
+
def get_task_by_id(*args, **kwargs):
|
|
780
|
+
con = get_server_api_connection()
|
|
781
|
+
return con.get_task_by_id(*args, **kwargs)
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
def get_task_by_name(*args, **kwargs):
|
|
785
|
+
con = get_server_api_connection()
|
|
786
|
+
return con.get_task_by_name(*args, **kwargs)
|
|
787
|
+
|
|
788
|
+
|
|
737
789
|
def get_folder_by_id(*args, **kwargs):
|
|
738
790
|
con = get_server_api_connection()
|
|
739
791
|
return con.get_folder_by_id(*args, **kwargs)
|
|
@@ -904,6 +956,11 @@ def delete_project(project_name):
|
|
|
904
956
|
return con.delete_project(project_name)
|
|
905
957
|
|
|
906
958
|
|
|
959
|
+
def get_thumbnail_by_id(project_name, thumbnail_id):
|
|
960
|
+
con = get_server_api_connection()
|
|
961
|
+
con.get_thumbnail_by_id(project_name, thumbnail_id)
|
|
962
|
+
|
|
963
|
+
|
|
907
964
|
def get_thumbnail(project_name, entity_type, entity_id, thumbnail_id=None):
|
|
908
965
|
con = get_server_api_connection()
|
|
909
966
|
con.get_thumbnail(project_name, entity_type, entity_id, thumbnail_id)
|
|
@@ -934,6 +991,11 @@ def update_thumbnail(project_name, thumbnail_id, src_filepath):
|
|
|
934
991
|
return con.update_thumbnail(project_name, thumbnail_id, src_filepath)
|
|
935
992
|
|
|
936
993
|
|
|
994
|
+
def get_attributes_fields_for_type(entity_type):
|
|
995
|
+
con = get_server_api_connection()
|
|
996
|
+
return con.get_attributes_fields_for_type(entity_type)
|
|
997
|
+
|
|
998
|
+
|
|
937
999
|
def get_default_fields_for_type(entity_type):
|
|
938
1000
|
con = get_server_api_connection()
|
|
939
1001
|
return con.get_default_fields_for_type(entity_type)
|
|
@@ -4,6 +4,25 @@ SERVER_API_ENV_KEY = "AYON_API_KEY"
|
|
|
4
4
|
# Backwards compatibility
|
|
5
5
|
SERVER_TOKEN_ENV_KEY = SERVER_API_ENV_KEY
|
|
6
6
|
|
|
7
|
+
# --- User ---
|
|
8
|
+
DEFAULT_USER_FIELDS = {
|
|
9
|
+
"roles",
|
|
10
|
+
"name",
|
|
11
|
+
"isService",
|
|
12
|
+
"isManager",
|
|
13
|
+
"isGuest",
|
|
14
|
+
"isAdmin",
|
|
15
|
+
"defaultRoles",
|
|
16
|
+
"createdAt",
|
|
17
|
+
"active",
|
|
18
|
+
"hasPassword",
|
|
19
|
+
"updatedAt",
|
|
20
|
+
"apiKeyPreview",
|
|
21
|
+
"attrib.avatarUrl",
|
|
22
|
+
"attrib.email",
|
|
23
|
+
"attrib.fullName",
|
|
24
|
+
}
|
|
25
|
+
|
|
7
26
|
# --- Product types ---
|
|
8
27
|
DEFAULT_PRODUCT_TYPE_FIELDS = {
|
|
9
28
|
"name",
|