Ayon-Python-Api 0.1.1__tar.gz → 0.1.3__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.
Files changed (28) hide show
  1. {ayon-python-api-0.1.1 → ayon-python-api-0.1.3}/PKG-INFO +9 -6
  2. {ayon-python-api-0.1.1 → ayon-python-api-0.1.3}/README.md +5 -1
  3. ayon-python-api-0.1.3/ayon_api/__init__.py +113 -0
  4. ayon-python-api-0.1.3/ayon_api/constants.py +90 -0
  5. ayon-python-api-0.1.3/ayon_api/entity_hub.py +1667 -0
  6. ayon-python-api-0.1.3/ayon_api/events.py +105 -0
  7. ayon-python-api-0.1.3/ayon_api/exceptions.py +2 -0
  8. ayon-python-api-0.1.3/ayon_api/graphql.py +927 -0
  9. ayon-python-api-0.1.3/ayon_api/graphql_queries.py +329 -0
  10. ayon-python-api-0.1.3/ayon_api/operations.py +821 -0
  11. ayon-python-api-0.1.3/ayon_api/server.py +2352 -0
  12. ayon-python-api-0.1.3/ayon_api/server_api.py +310 -0
  13. ayon-python-api-0.1.3/ayon_api/thumbnails.py +219 -0
  14. ayon-python-api-0.1.3/ayon_api/utils.py +281 -0
  15. ayon-python-api-0.1.3/ayon_api/version.py +2 -0
  16. {ayon-python-api-0.1.1/ayon_api → ayon-python-api-0.1.3}/ayon_python_api.egg-info/PKG-INFO +9 -6
  17. ayon-python-api-0.1.3/ayon_python_api.egg-info/SOURCES.txt +22 -0
  18. ayon-python-api-0.1.3/ayon_python_api.egg-info/dependency_links.txt +1 -0
  19. ayon-python-api-0.1.3/ayon_python_api.egg-info/requires.txt +2 -0
  20. {ayon-python-api-0.1.1 → ayon-python-api-0.1.3}/pyproject.toml +3 -2
  21. ayon-python-api-0.1.3/setup.py +38 -0
  22. ayon-python-api-0.1.1/ayon_api/ayon_python_api.egg-info/SOURCES.txt +0 -9
  23. ayon-python-api-0.1.1/ayon_api/ayon_python_api.egg-info/dependency_links.txt +0 -1
  24. ayon-python-api-0.1.1/ayon_api/ayon_python_api.egg-info/requires.txt +0 -2
  25. ayon-python-api-0.1.1/setup.py +0 -40
  26. {ayon-python-api-0.1.1 → ayon-python-api-0.1.3}/LICENSE +0 -0
  27. {ayon-python-api-0.1.1/ayon_api → ayon-python-api-0.1.3}/ayon_python_api.egg-info/top_level.txt +0 -0
  28. {ayon-python-api-0.1.1 → ayon-python-api-0.1.3}/setup.cfg +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ayon-python-api
3
- Version: 0.1.1
4
- Summary: Ayon Python API
3
+ Version: 0.1.3
4
+ Summary: AYON Python API
5
5
  Home-page: https://github.com/ynput/ayon-python-api
6
6
  Author: ynput.io
7
7
  Author-email: info@ynput.io
8
- License: UNKNOWN
9
- Description: # Ayon server API
8
+ License: Apache License (2.0)
9
+ Description: # AYON server API
10
10
  Python client for connection server. Client must be (at least for some time) Python 2 compatible because will be used in DCC that are "older".
11
11
 
12
12
  Client should support connection to server with raw REST functions and prepared functionality for work with entities. Must not contain only functionality that can be used with core server functionality.
@@ -19,8 +19,11 @@ Description: # Ayon server API
19
19
  - Missing CRUD operations for entities (Only read is possible)
20
20
  - More clear what is difference in `ServerAPIBase` and `ServerAPI`
21
21
  - `ServerAPI` was added primarily for desktop app which handle login and logout in a different way so the class should be maybe removed and `ServerAPIBase` should be renamed to `ServerAPI`
22
-
23
- Keywords: ayon,ynput,OpenPype,vfx
22
+ - find more suitable names of classes
23
+ - find more suitable name of objects (right now is used `connection` or `conn`)
24
+ - Add folder and task changes to operations
25
+ - Entity hub should use operations to update folders and tasks
26
+ Keywords: AYON,ynput,OpenPype,vfx
24
27
  Platform: UNKNOWN
25
28
  Classifier: Development Status :: 3 - Alpha
26
29
  Classifier: Programming Language :: Python
@@ -1,4 +1,4 @@
1
- # Ayon server API
1
+ # AYON server API
2
2
  Python client for connection server. Client must be (at least for some time) Python 2 compatible because will be used in DCC that are "older".
3
3
 
4
4
  Client should support connection to server with raw REST functions and prepared functionality for work with entities. Must not contain only functionality that can be used with core server functionality.
@@ -11,3 +11,7 @@ Client should support connection to server with raw REST functions and prepared
11
11
  - Missing CRUD operations for entities (Only read is possible)
12
12
  - More clear what is difference in `ServerAPIBase` and `ServerAPI`
13
13
  - `ServerAPI` was added primarily for desktop app which handle login and logout in a different way so the class should be maybe removed and `ServerAPIBase` should be renamed to `ServerAPI`
14
+ - find more suitable names of classes
15
+ - find more suitable name of objects (right now is used `connection` or `conn`)
16
+ - Add folder and task changes to operations
17
+ - Entity hub should use operations to update folders and tasks
@@ -0,0 +1,113 @@
1
+ from .server import (
2
+ ServerAPIBase,
3
+ )
4
+
5
+ from .server_api import (
6
+ ServerAPI,
7
+
8
+ get_server_api_connection,
9
+
10
+ get,
11
+ post,
12
+ put,
13
+ patch,
14
+ delete,
15
+
16
+ get_projects,
17
+ get_project,
18
+ create_project,
19
+ delete_project,
20
+
21
+ get_folder_by_id,
22
+ get_folder_by_name,
23
+ get_folder_by_path,
24
+ get_folders,
25
+
26
+ get_tasks,
27
+
28
+ get_folder_ids_with_subsets,
29
+ get_subset_by_id,
30
+ get_subset_by_name,
31
+ get_subsets,
32
+ get_subset_families,
33
+
34
+ get_version_by_id,
35
+ get_version_by_name,
36
+ version_is_latest,
37
+ get_versions,
38
+ get_hero_version_by_subset_id,
39
+ get_hero_version_by_id,
40
+ get_hero_versions,
41
+ get_last_versions,
42
+ get_last_version_by_subset_id,
43
+ get_last_version_by_subset_name,
44
+ get_representation_by_id,
45
+ get_representation_by_name,
46
+ get_representations,
47
+ get_representations_parents,
48
+ get_representation_parents,
49
+
50
+ get_project_settings,
51
+ get_addon_settings,
52
+
53
+ create_thumbnail,
54
+ get_thumbnail,
55
+ get_folder_thumbnail,
56
+ get_version_thumbnail,
57
+ get_workfile_thumbnail,
58
+ )
59
+
60
+
61
+ __all__ = (
62
+ "ServerAPIBase",
63
+
64
+ "ServerAPI",
65
+ "get_server_api_connection",
66
+ "get",
67
+ "post",
68
+ "put",
69
+ "patch",
70
+ "delete",
71
+
72
+ "get_project_settings",
73
+ "get_addon_settings",
74
+
75
+ "get_projects",
76
+ "get_project",
77
+ "create_project",
78
+ "delete_project",
79
+
80
+ "get_folder_by_id",
81
+ "get_folder_by_name",
82
+ "get_folder_by_path",
83
+ "get_folders",
84
+
85
+ "get_tasks",
86
+
87
+ "get_folder_ids_with_subsets",
88
+ "get_subset_by_id",
89
+ "get_subset_by_name",
90
+ "get_subsets",
91
+ "get_subset_families",
92
+ "get_version_by_id",
93
+ "get_version_by_name",
94
+ "version_is_latest",
95
+ "get_versions",
96
+ "get_hero_version_by_subset_id",
97
+ "get_hero_version_by_id",
98
+ "get_hero_versions",
99
+ "get_last_versions",
100
+ "get_last_version_by_subset_id",
101
+ "get_last_version_by_subset_name",
102
+ "get_representation_by_id",
103
+ "get_representation_by_name",
104
+ "get_representations",
105
+ "get_representations_parents",
106
+ "get_representation_parents",
107
+
108
+ "create_thumbnail",
109
+ "get_thumbnail",
110
+ "get_folder_thumbnail",
111
+ "get_version_thumbnail",
112
+ "get_workfile_thumbnail",
113
+ )
@@ -0,0 +1,90 @@
1
+ SERVER_URL_ENV_KEY = "AYON_SERVER_URL"
2
+ SERVER_TOKEN_ENV_KEY = "AYON_TOKEN"
3
+
4
+ # --- Project ---
5
+ DEFAULT_PROJECT_FIELDS = {
6
+ "active",
7
+ "name",
8
+ "code",
9
+ "config",
10
+ "createdAt",
11
+ }
12
+
13
+ # --- Folders ---
14
+ DEFAULT_FOLDER_FIELDS = {
15
+ "id",
16
+ "name",
17
+ "label",
18
+ "folderType",
19
+ "path",
20
+ "parentId",
21
+ "active",
22
+ "thumbnailId",
23
+ }
24
+
25
+ # --- Tasks ---
26
+ DEFAULT_TASK_FIELDS = {
27
+ "id",
28
+ "name",
29
+ "label",
30
+ "taskType",
31
+ "folderId",
32
+ "active",
33
+ "assignees",
34
+ }
35
+
36
+ # --- Subsets ---
37
+ DEFAULT_SUBSET_FIELDS = {
38
+ "id",
39
+ "name",
40
+ "folderId",
41
+ "active",
42
+ "family",
43
+ }
44
+
45
+ # --- Versions ---
46
+ DEFAULT_VERSION_FIELDS = {
47
+ "id",
48
+ "name",
49
+ "version",
50
+ "subsetId",
51
+ "taskId",
52
+ "active",
53
+ "author",
54
+ "thumbnailId",
55
+ "createdAt",
56
+ "updatedAt",
57
+ }
58
+
59
+ # --- Representations ---
60
+ DEFAULT_REPRESENTATION_FIELDS = {
61
+ "id",
62
+ "name",
63
+ "context",
64
+ "createdAt",
65
+ "active",
66
+ "versionId",
67
+ }
68
+
69
+ REPRESENTATION_FILES_FIELDS = {
70
+ "files.baseName",
71
+ "files.hash",
72
+ "files.id",
73
+ "files.path",
74
+ "files.size",
75
+ }
76
+
77
+ # --- Workfile info ---
78
+ DEFAULT_WORKFILE_INFO_FIELDS = {
79
+ "active",
80
+ "createdAt",
81
+ "createdBy",
82
+ "id",
83
+ "name",
84
+ "path",
85
+ "projectName",
86
+ "taskId",
87
+ "thumbnailId",
88
+ "updatedAt",
89
+ "updatedBy",
90
+ }