labkey 3.3.0__tar.gz → 3.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.
- {labkey-3.3.0 → labkey-3.4.0}/CHANGE.txt +11 -0
- {labkey-3.3.0/labkey.egg-info → labkey-3.4.0}/PKG-INFO +15 -2
- {labkey-3.3.0 → labkey-3.4.0}/labkey/__init__.py +1 -1
- {labkey-3.3.0 → labkey-3.4.0}/labkey/domain.py +6 -2
- {labkey-3.3.0 → labkey-3.4.0}/labkey/security.py +7 -2
- {labkey-3.3.0 → labkey-3.4.0}/labkey/server_context.py +6 -1
- {labkey-3.3.0 → labkey-3.4.0/labkey.egg-info}/PKG-INFO +15 -2
- {labkey-3.3.0 → labkey-3.4.0}/LICENSE.txt +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/MANIFEST.in +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/README.md +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/debug.txt +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/labkey/api_wrapper.py +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/labkey/container.py +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/labkey/exceptions.py +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/labkey/experiment.py +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/labkey/query.py +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/labkey/storage.py +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/labkey/utils.py +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/labkey.egg-info/SOURCES.txt +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/labkey.egg-info/dependency_links.txt +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/labkey.egg-info/requires.txt +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/labkey.egg-info/top_level.txt +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/pyproject.toml +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/pytest.ini +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/setup.cfg +0 -0
- {labkey-3.3.0 → labkey-3.4.0}/setup.py +0 -0
@@ -2,6 +2,17 @@
|
|
2
2
|
LabKey Python Client API News
|
3
3
|
+++++++++++
|
4
4
|
|
5
|
+
What's New in the LabKey 3.4.0 package
|
6
|
+
==============================
|
7
|
+
|
8
|
+
*Release date: TBD*
|
9
|
+
- Add "valueExpression" to PropertyDescriptor class
|
10
|
+
- needed for creating/adding domain calculated fields
|
11
|
+
- update Domain class to append calculatedFields to the domain's fields
|
12
|
+
- Fix Issue 52904
|
13
|
+
- UnexpectedRedirectError is not wrapped with ServerContextError
|
14
|
+
- Allow redirects when deactivating users
|
15
|
+
|
5
16
|
What's New in the LabKey 3.3.0 package
|
6
17
|
==============================
|
7
18
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: labkey
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.4.0
|
4
4
|
Summary: Python client API for LabKey Server
|
5
5
|
Home-page: https://github.com/LabKey/labkey-api-python
|
6
6
|
Author: LabKey
|
@@ -37,5 +37,18 @@ Requires-Dist: setuptools; extra == "build"
|
|
37
37
|
Requires-Dist: build; extra == "build"
|
38
38
|
Requires-Dist: twine; extra == "build"
|
39
39
|
Requires-Dist: wheel; extra == "build"
|
40
|
+
Dynamic: author
|
41
|
+
Dynamic: author-email
|
42
|
+
Dynamic: classifier
|
43
|
+
Dynamic: description
|
44
|
+
Dynamic: home-page
|
45
|
+
Dynamic: keywords
|
46
|
+
Dynamic: license
|
47
|
+
Dynamic: license-file
|
48
|
+
Dynamic: maintainer
|
49
|
+
Dynamic: maintainer-email
|
50
|
+
Dynamic: provides-extra
|
51
|
+
Dynamic: requires-dist
|
52
|
+
Dynamic: summary
|
40
53
|
|
41
54
|
Python client API for LabKey Server. Supports query and experiment APIs.
|
@@ -109,6 +109,7 @@ class PropertyDescriptor:
|
|
109
109
|
)
|
110
110
|
self.type_editable = kwargs.pop("type_editable", kwargs.pop("typeEditable", None))
|
111
111
|
self.url = kwargs.pop("url", None)
|
112
|
+
self.value_expression = kwargs.pop("value_expression", kwargs.pop("valueExpression", None))
|
112
113
|
|
113
114
|
def to_json(self, strip_none=True):
|
114
115
|
# TODO: Likely only want to include those that are not None
|
@@ -155,6 +156,7 @@ class PropertyDescriptor:
|
|
155
156
|
"shownInUpdateView": self.shown_in_update_view,
|
156
157
|
"typeEditable": self.type_editable,
|
157
158
|
"url": self.url,
|
159
|
+
"valueExpression": self.value_expression,
|
158
160
|
}
|
159
161
|
|
160
162
|
json_formats = []
|
@@ -232,9 +234,11 @@ class Domain:
|
|
232
234
|
"template_description", kwargs.pop("templateDescription", None)
|
233
235
|
)
|
234
236
|
|
235
|
-
fields = kwargs.pop("fields", [])
|
236
237
|
fields_instances = []
|
237
|
-
|
238
|
+
fields = kwargs.pop("fields", [])
|
239
|
+
for field in fields:
|
240
|
+
fields_instances.append(PropertyDescriptor(**field))
|
241
|
+
fields = kwargs.pop("calculated_fields", kwargs.pop("calculatedFields", []))
|
238
242
|
for field in fields:
|
239
243
|
fields_instances.append(PropertyDescriptor(**field))
|
240
244
|
|
@@ -121,6 +121,7 @@ def deactivate_users(
|
|
121
121
|
target_ids=target_ids,
|
122
122
|
api="deactivateUsers.view",
|
123
123
|
container_path=container_path,
|
124
|
+
allow_redirects=True,
|
124
125
|
)
|
125
126
|
if response is not None and response["status_code"] == 200:
|
126
127
|
return dict(success=True)
|
@@ -360,7 +361,11 @@ def __make_security_role_api_request(
|
|
360
361
|
|
361
362
|
|
362
363
|
def __make_user_api_request(
|
363
|
-
server_context: ServerContext,
|
364
|
+
server_context: ServerContext,
|
365
|
+
target_ids: List[int],
|
366
|
+
api: str,
|
367
|
+
container_path: str = None,
|
368
|
+
allow_redirects: bool = False,
|
364
369
|
):
|
365
370
|
"""
|
366
371
|
Make a request to the LabKey User Controller
|
@@ -372,7 +377,7 @@ def __make_user_api_request(
|
|
372
377
|
"""
|
373
378
|
url = server_context.build_url(USER_CONTROLLER, api, container_path)
|
374
379
|
|
375
|
-
return server_context.make_request(url, {"userId": target_ids})
|
380
|
+
return server_context.make_request(url, {"userId": target_ids}, allow_redirects=allow_redirects)
|
376
381
|
|
377
382
|
|
378
383
|
class SecurityWrapper:
|
@@ -164,7 +164,12 @@ class ServerContext:
|
|
164
164
|
return client
|
165
165
|
|
166
166
|
def handle_request_exception(self, exception):
|
167
|
-
if type(exception) in [
|
167
|
+
if type(exception) in [
|
168
|
+
RequestAuthorizationError,
|
169
|
+
QueryNotFoundError,
|
170
|
+
ServerNotFoundError,
|
171
|
+
UnexpectedRedirectError,
|
172
|
+
]:
|
168
173
|
raise exception
|
169
174
|
|
170
175
|
raise ServerContextError(self, exception)
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: labkey
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.4.0
|
4
4
|
Summary: Python client API for LabKey Server
|
5
5
|
Home-page: https://github.com/LabKey/labkey-api-python
|
6
6
|
Author: LabKey
|
@@ -37,5 +37,18 @@ Requires-Dist: setuptools; extra == "build"
|
|
37
37
|
Requires-Dist: build; extra == "build"
|
38
38
|
Requires-Dist: twine; extra == "build"
|
39
39
|
Requires-Dist: wheel; extra == "build"
|
40
|
+
Dynamic: author
|
41
|
+
Dynamic: author-email
|
42
|
+
Dynamic: classifier
|
43
|
+
Dynamic: description
|
44
|
+
Dynamic: home-page
|
45
|
+
Dynamic: keywords
|
46
|
+
Dynamic: license
|
47
|
+
Dynamic: license-file
|
48
|
+
Dynamic: maintainer
|
49
|
+
Dynamic: maintainer-email
|
50
|
+
Dynamic: provides-extra
|
51
|
+
Dynamic: requires-dist
|
52
|
+
Dynamic: summary
|
40
53
|
|
41
54
|
Python client API for LabKey Server. Supports query and experiment APIs.
|
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
|