Ayon-Python-Api 0.3.6__tar.gz → 0.4.0__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.6 → ayon-python-api-0.4.0}/PKG-INFO +1 -1
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_api/constants.py +2 -2
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_api/server_api.py +24 -3
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_api/version.py +1 -1
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_python_api.egg-info/PKG-INFO +1 -1
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/pyproject.toml +1 -1
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/LICENSE +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/README.md +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_api/__init__.py +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_api/_api.py +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_api/entity_hub.py +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_api/events.py +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_api/exceptions.py +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_api/graphql.py +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_api/graphql_queries.py +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_api/operations.py +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_api/utils.py +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_python_api.egg-info/SOURCES.txt +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_python_api.egg-info/dependency_links.txt +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_python_api.egg-info/requires.txt +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/ayon_python_api.egg-info/top_level.txt +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/setup.cfg +0 -0
- {ayon-python-api-0.3.6 → ayon-python-api-0.4.0}/setup.py +0 -0
|
@@ -9,13 +9,13 @@ SERVER_TOKEN_ENV_KEY = SERVER_API_ENV_KEY
|
|
|
9
9
|
|
|
10
10
|
# --- User ---
|
|
11
11
|
DEFAULT_USER_FIELDS = {
|
|
12
|
-
"
|
|
12
|
+
"accessGroups",
|
|
13
|
+
"defaultAccessGroups",
|
|
13
14
|
"name",
|
|
14
15
|
"isService",
|
|
15
16
|
"isManager",
|
|
16
17
|
"isGuest",
|
|
17
18
|
"isAdmin",
|
|
18
|
-
"defaultRoles",
|
|
19
19
|
"createdAt",
|
|
20
20
|
"active",
|
|
21
21
|
"hasPassword",
|
|
@@ -989,9 +989,17 @@ class ServerAPI(object):
|
|
|
989
989
|
for attr, filter_value in filters.items():
|
|
990
990
|
query.set_variable_value(attr, filter_value)
|
|
991
991
|
|
|
992
|
+
# Backwards compatibility for server 0.3.x
|
|
993
|
+
# - will be removed in future releases
|
|
994
|
+
major, minor, _, _, _ = self.server_version_tuple
|
|
995
|
+
access_groups_field = "accessGroups"
|
|
996
|
+
if major == 0 and minor <= 3:
|
|
997
|
+
access_groups_field = "roles"
|
|
998
|
+
|
|
992
999
|
for parsed_data in query.continuous_query(self):
|
|
993
1000
|
for user in parsed_data["users"]:
|
|
994
|
-
user[
|
|
1001
|
+
user[access_groups_field] = json.loads(
|
|
1002
|
+
user[access_groups_field])
|
|
995
1003
|
yield user
|
|
996
1004
|
|
|
997
1005
|
def get_user(self, username=None):
|
|
@@ -1866,7 +1874,15 @@ class ServerAPI(object):
|
|
|
1866
1874
|
entity_type_defaults = DEFAULT_WORKFILE_INFO_FIELDS
|
|
1867
1875
|
|
|
1868
1876
|
elif entity_type == "user":
|
|
1869
|
-
entity_type_defaults = DEFAULT_USER_FIELDS
|
|
1877
|
+
entity_type_defaults = set(DEFAULT_USER_FIELDS)
|
|
1878
|
+
# Backwards compatibility for server 0.3.x
|
|
1879
|
+
# - will be removed in future releases
|
|
1880
|
+
major, minor, _, _, _ = self.server_version_tuple
|
|
1881
|
+
if major == 0 and minor <= 3:
|
|
1882
|
+
entity_type_defaults.discard("accessGroups")
|
|
1883
|
+
entity_type_defaults.discard("defaultAccessGroups")
|
|
1884
|
+
entity_type_defaults.add("roles")
|
|
1885
|
+
entity_type_defaults.add("defaultRoles")
|
|
1870
1886
|
|
|
1871
1887
|
else:
|
|
1872
1888
|
raise ValueError("Unknown entity type \"{}\"".format(entity_type))
|
|
@@ -2243,7 +2259,12 @@ class ServerAPI(object):
|
|
|
2243
2259
|
server.
|
|
2244
2260
|
"""
|
|
2245
2261
|
|
|
2246
|
-
|
|
2262
|
+
endpoint = "desktop/dependencyPackages"
|
|
2263
|
+
major, minor, _, _, _ = self.server_version_tuple
|
|
2264
|
+
if major == 0 and minor <= 3:
|
|
2265
|
+
endpoint = "desktop/dependency_packages"
|
|
2266
|
+
|
|
2267
|
+
result = self.get(endpoint)
|
|
2247
2268
|
result.raise_for_status()
|
|
2248
2269
|
return result.data
|
|
2249
2270
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""Package declaring Python API for Ayon server."""
|
|
2
|
-
__version__ = "0.
|
|
2
|
+
__version__ = "0.4.0"
|
|
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-0.3.6 → ayon-python-api-0.4.0}/ayon_python_api.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|