odsbox 1.0.16rc476.post1__py3-none-any.whl → 1.0.16rc479.post1__py3-none-any.whl
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.
- odsbox/__init__.py +1 -1
- odsbox/con_i.py +14 -7
- {odsbox-1.0.16rc476.post1.dist-info → odsbox-1.0.16rc479.post1.dist-info}/METADATA +1 -1
- {odsbox-1.0.16rc476.post1.dist-info → odsbox-1.0.16rc479.post1.dist-info}/RECORD +6 -6
- {odsbox-1.0.16rc476.post1.dist-info → odsbox-1.0.16rc479.post1.dist-info}/WHEEL +0 -0
- {odsbox-1.0.16rc476.post1.dist-info → odsbox-1.0.16rc479.post1.dist-info}/licenses/LICENSE +0 -0
odsbox/__init__.py
CHANGED
odsbox/con_i.py
CHANGED
|
@@ -58,13 +58,14 @@ class ConI:
|
|
|
58
58
|
def __init__(
|
|
59
59
|
self,
|
|
60
60
|
url: str = "http://localhost:8080/api",
|
|
61
|
-
auth: requests.auth.AuthBase | tuple[str, str] = ("sa", "sa"),
|
|
61
|
+
auth: requests.auth.AuthBase | tuple[str, str] | None = ("sa", "sa"),
|
|
62
62
|
context_variables: ods.ContextVariables | dict | None = None,
|
|
63
63
|
verify_certificate: bool = True,
|
|
64
64
|
load_model: bool = True,
|
|
65
65
|
allow_redirects: bool = False,
|
|
66
66
|
connection_timeout: float = 60.0,
|
|
67
67
|
request_timeout: float = 600.0,
|
|
68
|
+
custom_session: requests.Session | None = None,
|
|
68
69
|
) -> None:
|
|
69
70
|
"""
|
|
70
71
|
Create a session object keeping track of ASAM ODS session URL named `conI`.
|
|
@@ -101,16 +102,20 @@ class ConI:
|
|
|
101
102
|
|
|
102
103
|
|
|
103
104
|
:param str url: base url of the ASAM ODS API of a given server. An example is "http://localhost:8080/api".
|
|
104
|
-
:param requests.auth.AuthBase auth: An auth object to be used for the used
|
|
105
|
-
For basic auth `("USER", "PASSWORD")` can be used.
|
|
105
|
+
:param requests.auth.AuthBase | tuple[str, str] | None auth: An auth object to be used for the used
|
|
106
|
+
requests package. For basic auth `("USER", "PASSWORD")` can be used.
|
|
107
|
+
Ignored if `custom_session` is provided.
|
|
106
108
|
:param ods.ContextVariables | dict | None context_variables: If context variables are necessary for the
|
|
107
109
|
connection they are passed here. It defaults to None.
|
|
108
110
|
:param bool verify_certificate: If no certificate is provided for https insecure access can be enabled.
|
|
109
|
-
It defaults to True.
|
|
111
|
+
It defaults to True. Ignored if `custom_session` is provided.
|
|
110
112
|
:param bool load_model: If the model should be read after connection is established. It defaults to True.
|
|
111
113
|
:param bool allow_redirects: If redirects should be allowed in requests calls. It defaults to False.
|
|
112
114
|
:param float connection_timeout: Timeout in seconds for establishing connections. It defaults to 60.0.
|
|
113
115
|
:param float request_timeout: Timeout in seconds for individual requests. It defaults to 600.0.
|
|
116
|
+
:param requests.Session | None custom_session: If a preconfigured requests.Session should be used.
|
|
117
|
+
If provided `auth` and `verify_certificate` parameters are ignored. It defaults to None.
|
|
118
|
+
e.g. Some OAuth packages provide custom `requests.Session` implementations.
|
|
114
119
|
:raises requests.HTTPError: If connection to ASAM ODS server fails.
|
|
115
120
|
"""
|
|
116
121
|
self.__session: requests.Session | None = None
|
|
@@ -122,9 +127,11 @@ class ConI:
|
|
|
122
127
|
self.__connection_timeout: float = connection_timeout
|
|
123
128
|
self.__request_timeout: float = request_timeout
|
|
124
129
|
|
|
125
|
-
session =
|
|
126
|
-
session
|
|
127
|
-
|
|
130
|
+
session = custom_session
|
|
131
|
+
if session is None:
|
|
132
|
+
session = requests.Session()
|
|
133
|
+
session.auth = auth
|
|
134
|
+
session.verify = verify_certificate
|
|
128
135
|
|
|
129
136
|
_context_variables = None
|
|
130
137
|
if isinstance(context_variables, ods.ContextVariables):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: odsbox
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.16rc479.post1
|
|
4
4
|
Summary: Toolbox for accessing ASAM ODS servers using the HTTP API
|
|
5
5
|
Keywords: asam,ods,measurement,data access,data science,data analysis
|
|
6
6
|
Author-email: Andreas Krantz <a.krantz@peak-solution.de>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
odsbox/__init__.py,sha256=
|
|
1
|
+
odsbox/__init__.py,sha256=pcz2LTzVnnhhnKPgqDFPQEisxPyEeJNjcYxgdO1wMOE,919
|
|
2
2
|
odsbox/asam_time.py,sha256=Nv367IB6aOUIIfQk388nY3Br6VSqiayQLlEsb8JWelU,2844
|
|
3
3
|
odsbox/bulk_reader.py,sha256=_NEf65vGdCHPWYJeNFj4M5KWxU7LEHmMsRXiQ3lEg6g,20296
|
|
4
|
-
odsbox/con_i.py,sha256=
|
|
4
|
+
odsbox/con_i.py,sha256=EyuNhxPMMUvGdXpeU30f1xPV4KMd1wSg5O5Fli53o_U,38885
|
|
5
5
|
odsbox/datamatrices_to_pandas.py,sha256=8Bzf3Dcz2sgZrr0tugLPb46odlnx1KWgDjeHit9Xzp0,14501
|
|
6
6
|
odsbox/jaquel.py,sha256=JG6zdi11BSvOJJFGQx5eOdF3f8ii1WfAirUg-1Vl6_4,38948
|
|
7
7
|
odsbox/jaquel_conversion_result.py,sha256=FR0ilSNAAxnefcTypjqT481yRs1ZGncSPSIJGKbPrbk,2734
|
|
@@ -24,7 +24,7 @@ odsbox/proto/ods_pb2.py,sha256=Y9xq6NCaa49QORQll9JM9allilqEIMXuPrllmcUQTmQ,32955
|
|
|
24
24
|
odsbox/proto/ods_pb2.pyi,sha256=GePovXXMLHaPfMzJDLYEZle61k1CoeEKag3uuLU4POo,58064
|
|
25
25
|
odsbox/proto/ods_security_pb2.py,sha256=qW0oDYCYJg9BcfSzzgatalD--J3stBgf9uwocf5VqYk,4755
|
|
26
26
|
odsbox/proto/ods_security_pb2.pyi,sha256=wRCRfZqgXw2Mojbq1qJj7gNybWlkd3IPH5srFZ5VlWo,6051
|
|
27
|
-
odsbox-1.0.
|
|
28
|
-
odsbox-1.0.
|
|
29
|
-
odsbox-1.0.
|
|
30
|
-
odsbox-1.0.
|
|
27
|
+
odsbox-1.0.16rc479.post1.dist-info/licenses/LICENSE,sha256=uVaF5FulCvEj-4fhJv3DiM2KyjqLeeHNh1agjmaOS1s,1133
|
|
28
|
+
odsbox-1.0.16rc479.post1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
29
|
+
odsbox-1.0.16rc479.post1.dist-info/METADATA,sha256=MzB9mknylJ4Eqw6WHcB9xUTe--SrFfFBXaBeZCKkv0c,7107
|
|
30
|
+
odsbox-1.0.16rc479.post1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|