ayon-python-api 1.2.9__tar.gz → 1.2.10__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-1.2.9 → ayon_python_api-1.2.10}/PKG-INFO +1 -1
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/links.py +6 -1
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/utils.py +20 -2
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/version.py +1 -1
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_python_api.egg-info/PKG-INFO +1 -1
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/pyproject.toml +1 -1
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/LICENSE +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/README.md +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/__init__.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/__init__.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/actions.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/activities.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/attributes.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/base.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/bundles_addons.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/dependency_packages.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/events.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/folders.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/installers.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/lists.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/products.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/projects.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/representations.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/secrets.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/tasks.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/thumbnails.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/versions.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/workfiles.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/constants.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/entity_hub.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/events.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/exceptions.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/graphql.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/graphql_queries.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/operations.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/server_api.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/typing.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_python_api.egg-info/SOURCES.txt +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_python_api.egg-info/dependency_links.txt +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_python_api.egg-info/requires.txt +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_python_api.egg-info/top_level.txt +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/setup.cfg +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/setup.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/tests/test_entity_hub.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/tests/test_folder_hierarchy.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/tests/test_get_events.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/tests/test_graphql_queries.py +0 -0
- {ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/tests/test_server.py +0 -0
|
@@ -203,6 +203,7 @@ class LinksAPI(BaseServerAPI):
|
|
|
203
203
|
output_id: str,
|
|
204
204
|
output_type: str,
|
|
205
205
|
link_name: Optional[str] = None,
|
|
206
|
+
data: Optional[dict[str, Any]] = None,
|
|
206
207
|
) -> CreateLinkData:
|
|
207
208
|
"""Create link between 2 entities.
|
|
208
209
|
|
|
@@ -222,7 +223,8 @@ class LinksAPI(BaseServerAPI):
|
|
|
222
223
|
output_id (str): Output entity id.
|
|
223
224
|
output_type (str): Entity type of output entity.
|
|
224
225
|
link_name (Optional[str]): Name of link.
|
|
225
|
-
|
|
226
|
+
data (Optional[dict[str, Any]]): Additional data to be stored
|
|
227
|
+
with the link.
|
|
226
228
|
|
|
227
229
|
Returns:
|
|
228
230
|
CreateLinkData: Information about link.
|
|
@@ -242,6 +244,9 @@ class LinksAPI(BaseServerAPI):
|
|
|
242
244
|
if link_name:
|
|
243
245
|
kwargs["name"] = link_name
|
|
244
246
|
|
|
247
|
+
if data:
|
|
248
|
+
kwargs["data"] = data
|
|
249
|
+
|
|
245
250
|
response = self.post(
|
|
246
251
|
f"projects/{project_name}/links", **kwargs
|
|
247
252
|
)
|
|
@@ -4,6 +4,8 @@ import os
|
|
|
4
4
|
import re
|
|
5
5
|
import datetime
|
|
6
6
|
import copy
|
|
7
|
+
import logging
|
|
8
|
+
import json
|
|
7
9
|
import uuid
|
|
8
10
|
import string
|
|
9
11
|
import platform
|
|
@@ -101,8 +103,9 @@ def _get_description(response):
|
|
|
101
103
|
return HTTPStatus(response.status).description
|
|
102
104
|
|
|
103
105
|
|
|
104
|
-
class RestApiResponse
|
|
106
|
+
class RestApiResponse:
|
|
105
107
|
"""API Response."""
|
|
108
|
+
log = logging.getLogger("RestApiResponse")
|
|
106
109
|
|
|
107
110
|
def __init__(self, response, data=None):
|
|
108
111
|
if response is None:
|
|
@@ -134,7 +137,7 @@ class RestApiResponse(object):
|
|
|
134
137
|
if self._data is None:
|
|
135
138
|
try:
|
|
136
139
|
self._data = self.orig_response.json()
|
|
137
|
-
except RequestsJSONDecodeError:
|
|
140
|
+
except (AttributeError, RequestsJSONDecodeError):
|
|
138
141
|
self._data = {}
|
|
139
142
|
return self._data
|
|
140
143
|
|
|
@@ -178,6 +181,21 @@ class RestApiResponse(object):
|
|
|
178
181
|
except requests.exceptions.HTTPError as exc:
|
|
179
182
|
if message is None:
|
|
180
183
|
message = str(exc)
|
|
184
|
+
|
|
185
|
+
submsg = ""
|
|
186
|
+
if self.data:
|
|
187
|
+
submsg = json.dumps(self.data, indent=4)
|
|
188
|
+
|
|
189
|
+
self.log.warning(
|
|
190
|
+
"HTTP request error: %s%s%s",
|
|
191
|
+
message,
|
|
192
|
+
"\n" if submsg else "",
|
|
193
|
+
submsg,
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
detail = self.data.get("detail")
|
|
197
|
+
if detail:
|
|
198
|
+
message = f"{message} ({detail})"
|
|
181
199
|
raise HTTPRequestError(message, exc.response)
|
|
182
200
|
|
|
183
201
|
def __enter__(self, *args, **kwargs):
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""Package declaring Python API for AYON server."""
|
|
2
|
-
__version__ = "1.2.
|
|
2
|
+
__version__ = "1.2.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_api/_api_helpers/dependency_packages.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ayon_python_api-1.2.9 → ayon_python_api-1.2.10}/ayon_python_api.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|