pytrms 0.9.8__tar.gz → 0.9.9__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.
- {pytrms-0.9.8 → pytrms-0.9.9}/PKG-INFO +1 -1
- {pytrms-0.9.8 → pytrms-0.9.9}/pyproject.toml +1 -1
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/__init__.py +1 -1
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/clients/db_api.py +11 -4
- {pytrms-0.9.8 → pytrms-0.9.9}/LICENSE +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/_base/__init__.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/_base/ioniclient.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/_base/mqttclient.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/_version.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/clients/__init__.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/clients/dummy.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/clients/ioniclient.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/clients/modbus.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/clients/mqtt.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/clients/ssevent.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/compose/__init__.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/compose/composition.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/data/IoniTofPrefs.ini +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/data/ParaIDs.csv +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/helpers.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/instrument.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/measurement.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/peaktable.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/plotting/__init__.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/plotting/plotting.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/readers/__init__.py +0 -0
- {pytrms-0.9.8 → pytrms-0.9.9}/pytrms/readers/ionitof_reader.py +0 -0
|
@@ -168,7 +168,7 @@ class IoniConnect(_IoniClientBase):
|
|
|
168
168
|
|
|
169
169
|
def delete(self, endpoint, **kwargs):
|
|
170
170
|
"""Attempt to delete the object at `endpoint`."""
|
|
171
|
-
r = self._fetch_object(endpoint,
|
|
171
|
+
r = self._fetch_object(endpoint, 'delete', **kwargs)
|
|
172
172
|
return _unsafe(r.status_code, r.headers.get('Location', r.request.path_url))
|
|
173
173
|
|
|
174
174
|
def link(self, parent_ep, child_ep, **kwargs):
|
|
@@ -252,12 +252,19 @@ class IoniConnect(_IoniClientBase):
|
|
|
252
252
|
return r
|
|
253
253
|
|
|
254
254
|
def _make_link(self, parent_href, child_href, *, sever=False, **kwargs):
|
|
255
|
-
|
|
255
|
+
if not parent_href.startswith('/'):
|
|
256
|
+
parent_href = '/' + parent_href
|
|
257
|
+
if not child_href.startswith('/'):
|
|
258
|
+
child_href = '/' + child_href
|
|
259
|
+
if 'headers' not in kwargs:
|
|
260
|
+
kwargs['headers'] = {'location': child_href}
|
|
261
|
+
else:
|
|
262
|
+
kwargs['headers'].update({'location': child_href})
|
|
256
263
|
if 'timeout' not in kwargs:
|
|
257
264
|
# https://requests.readthedocs.io/en/latest/user/advanced/#timeouts
|
|
258
265
|
kwargs['timeout'] = (6.06, 27)
|
|
259
|
-
r = self.session.request(
|
|
260
|
-
|
|
266
|
+
r = self.session.request("LINK" if not sever else "UNLINK",
|
|
267
|
+
self.url + parent_href, **kwargs)
|
|
261
268
|
r.raise_for_status()
|
|
262
269
|
|
|
263
270
|
return r
|
|
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
|