Ayon-Python-Api 0.3.2__tar.gz → 0.3.4__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.2 → ayon-python-api-0.3.4}/PKG-INFO +2 -3
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/README.md +1 -2
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_api/__init__.py +4 -0
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_api/_api.py +30 -34
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_api/entity_hub.py +744 -4
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_api/server_api.py +187 -22
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_api/utils.py +131 -8
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_api/version.py +1 -1
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_python_api.egg-info/PKG-INFO +2 -3
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/pyproject.toml +1 -1
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/LICENSE +0 -0
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_api/constants.py +0 -0
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_api/events.py +0 -0
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_api/exceptions.py +0 -0
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_api/graphql.py +0 -0
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_api/graphql_queries.py +0 -0
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_api/operations.py +0 -0
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_api/thumbnails.py +0 -0
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_python_api.egg-info/SOURCES.txt +0 -0
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_python_api.egg-info/dependency_links.txt +0 -0
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_python_api.egg-info/requires.txt +0 -0
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/ayon_python_api.egg-info/top_level.txt +0 -0
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/setup.cfg +0 -0
- {ayon-python-api-0.3.2 → ayon-python-api-0.3.4}/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.4
|
|
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
|
|
@@ -78,6 +78,8 @@ from ._api import (
|
|
|
78
78
|
download_dependency_package,
|
|
79
79
|
upload_dependency_package,
|
|
80
80
|
|
|
81
|
+
upload_addon_zip,
|
|
82
|
+
|
|
81
83
|
get_bundles,
|
|
82
84
|
create_bundle,
|
|
83
85
|
update_bundle,
|
|
@@ -262,6 +264,8 @@ __all__ = (
|
|
|
262
264
|
"download_dependency_package",
|
|
263
265
|
"upload_dependency_package",
|
|
264
266
|
|
|
267
|
+
"upload_addon_zip",
|
|
268
|
+
|
|
265
269
|
"get_bundles",
|
|
266
270
|
"create_bundle",
|
|
267
271
|
"update_bundle",
|
|
@@ -25,12 +25,29 @@ class GlobalServerAPI(ServerAPI):
|
|
|
25
25
|
but that can be filled afterwards with calling 'login' method.
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
|
-
def __init__(
|
|
28
|
+
def __init__(
|
|
29
|
+
self,
|
|
30
|
+
site_id=None,
|
|
31
|
+
client_version=None,
|
|
32
|
+
default_settings_variant=None,
|
|
33
|
+
ssl_verify=None,
|
|
34
|
+
cert=None,
|
|
35
|
+
):
|
|
29
36
|
url = self.get_url()
|
|
30
37
|
token = self.get_token()
|
|
31
38
|
|
|
32
|
-
super(GlobalServerAPI, self).__init__(
|
|
33
|
-
|
|
39
|
+
super(GlobalServerAPI, self).__init__(
|
|
40
|
+
url,
|
|
41
|
+
token,
|
|
42
|
+
site_id,
|
|
43
|
+
client_version,
|
|
44
|
+
default_settings_variant,
|
|
45
|
+
ssl_verify,
|
|
46
|
+
cert,
|
|
47
|
+
# We want to make sure that server and api key validation
|
|
48
|
+
# happens all the time in 'GlobalServerAPI'.
|
|
49
|
+
create_session=False,
|
|
50
|
+
)
|
|
34
51
|
self.validate_server_availability()
|
|
35
52
|
self.create_session()
|
|
36
53
|
|
|
@@ -129,17 +146,6 @@ class ServiceContext:
|
|
|
129
146
|
addon_version = None
|
|
130
147
|
service_name = None
|
|
131
148
|
|
|
132
|
-
@staticmethod
|
|
133
|
-
def get_value_from_envs(env_keys, value=None):
|
|
134
|
-
if value:
|
|
135
|
-
return value
|
|
136
|
-
|
|
137
|
-
for env_key in env_keys:
|
|
138
|
-
value = os.environ.get(env_key)
|
|
139
|
-
if value:
|
|
140
|
-
break
|
|
141
|
-
return value
|
|
142
|
-
|
|
143
149
|
@classmethod
|
|
144
150
|
def init_service(
|
|
145
151
|
cls,
|
|
@@ -150,14 +156,8 @@ class ServiceContext:
|
|
|
150
156
|
service_name=None,
|
|
151
157
|
connect=True
|
|
152
158
|
):
|
|
153
|
-
token =
|
|
154
|
-
|
|
155
|
-
token
|
|
156
|
-
)
|
|
157
|
-
server_url = cls.get_value_from_envs(
|
|
158
|
-
("AY_SERVER_URL", "AYON_SERVER_URL"),
|
|
159
|
-
server_url
|
|
160
|
-
)
|
|
159
|
+
token = token or os.environ.get("AYON_API_KEY")
|
|
160
|
+
server_url = server_url or os.environ.get("AYON_SERVER_URL")
|
|
161
161
|
if not server_url:
|
|
162
162
|
raise FailedServiceInit("URL to server is not set")
|
|
163
163
|
|
|
@@ -166,18 +166,9 @@ class ServiceContext:
|
|
|
166
166
|
"Token to server {} is not set".format(server_url)
|
|
167
167
|
)
|
|
168
168
|
|
|
169
|
-
addon_name =
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
)
|
|
173
|
-
addon_version = cls.get_value_from_envs(
|
|
174
|
-
("AY_ADDON_VERSION", "AYON_ADDON_VERSION"),
|
|
175
|
-
addon_version
|
|
176
|
-
)
|
|
177
|
-
service_name = cls.get_value_from_envs(
|
|
178
|
-
("AY_SERVICE_NAME", "AYON_SERVICE_NAME"),
|
|
179
|
-
service_name
|
|
180
|
-
)
|
|
169
|
+
addon_name = addon_name or os.environ.get("AYON_ADDON_NAME")
|
|
170
|
+
addon_version = addon_version or os.environ.get("AYON_ADDON_VERSION")
|
|
171
|
+
service_name = service_name or os.environ.get("AYON_SERVICE_NAME")
|
|
181
172
|
|
|
182
173
|
cls.token = token
|
|
183
174
|
cls.server_url = server_url
|
|
@@ -618,6 +609,11 @@ def delete_dependency_package(*args, **kwargs):
|
|
|
618
609
|
return con.delete_dependency_package(*args, **kwargs)
|
|
619
610
|
|
|
620
611
|
|
|
612
|
+
def upload_addon_zip(*args, **kwargs):
|
|
613
|
+
con = get_server_api_connection()
|
|
614
|
+
return con.upload_addon_zip(*args, **kwargs)
|
|
615
|
+
|
|
616
|
+
|
|
621
617
|
def get_project_anatomy_presets(*args, **kwargs):
|
|
622
618
|
con = get_server_api_connection()
|
|
623
619
|
return con.get_project_anatomy_presets(*args, **kwargs)
|