odsbox 1.0.16rc492.post1__py3-none-any.whl → 1.0.17rc495.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 +10 -5
- {odsbox-1.0.16rc492.post1.dist-info → odsbox-1.0.17rc495.post1.dist-info}/METADATA +1 -1
- {odsbox-1.0.16rc492.post1.dist-info → odsbox-1.0.17rc495.post1.dist-info}/RECORD +6 -6
- {odsbox-1.0.16rc492.post1.dist-info → odsbox-1.0.17rc495.post1.dist-info}/WHEEL +0 -0
- {odsbox-1.0.16rc492.post1.dist-info → odsbox-1.0.17rc495.post1.dist-info}/licenses/LICENSE +0 -0
odsbox/__init__.py
CHANGED
odsbox/con_i.py
CHANGED
|
@@ -272,10 +272,10 @@ class ConI:
|
|
|
272
272
|
This uses pandas native nullable data types for better type preservation.
|
|
273
273
|
Defaults to True.
|
|
274
274
|
:param str result_naming_mode: Controls how result column names are generated.
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
275
|
+
"query" (default): Uses column names from the JAQUEL query
|
|
276
|
+
(e.g., 'name', 'phys_dimension.name').
|
|
277
|
+
"model": Uses column names from the ods.Model schema
|
|
278
|
+
(e.g., 'Unit.Name', 'PhysDimension.Name').
|
|
279
279
|
:param kwargs: Additional arguments passed to `to_pandas`.
|
|
280
280
|
:raises requests.HTTPError: If query fails.
|
|
281
281
|
:return DataFrame: The DataMatrices as Pandas.DataFrame with columns named according to `result_naming_mode`.
|
|
@@ -691,6 +691,7 @@ class ConI:
|
|
|
691
691
|
target_file_or_folder: str,
|
|
692
692
|
overwrite_existing: bool = False,
|
|
693
693
|
default_filename: str = "download.bin",
|
|
694
|
+
chunk_size: int = 8192,
|
|
694
695
|
) -> str:
|
|
695
696
|
"""
|
|
696
697
|
Read file content from server.
|
|
@@ -701,6 +702,7 @@ class ConI:
|
|
|
701
702
|
:param bool overwrite_existing: If existing files should be overwritten. It defaults to False.
|
|
702
703
|
:param str default_filename: Default filename if no filename is provided by server.
|
|
703
704
|
It defaults to "download.bin".
|
|
705
|
+
:param int chunk_size: Size of chunks in bytes to stream. It defaults to 8192 (8KB).
|
|
704
706
|
:raises requests.HTTPError: If something went wrong.
|
|
705
707
|
:raises FileExistsError: If file already exists and 'overwrite_existing' is False.
|
|
706
708
|
:raises ValueError: If no open session.
|
|
@@ -721,6 +723,7 @@ class ConI:
|
|
|
721
723
|
},
|
|
722
724
|
timeout=self.__request_timeout,
|
|
723
725
|
allow_redirects=self.__allow_redirects,
|
|
726
|
+
stream=True,
|
|
724
727
|
)
|
|
725
728
|
self.check_requests_response(file_response)
|
|
726
729
|
|
|
@@ -740,7 +743,9 @@ class ConI:
|
|
|
740
743
|
raise FileExistsError(f"File '{target_file_path}' already exists and 'overwrite_existing' is False.")
|
|
741
744
|
|
|
742
745
|
with open(target_file_path, "wb") as file:
|
|
743
|
-
|
|
746
|
+
for chunk in file_response.iter_content(chunk_size=chunk_size):
|
|
747
|
+
if chunk: # filter out keep-alive new chunks
|
|
748
|
+
file.write(chunk)
|
|
744
749
|
|
|
745
750
|
return target_file_path
|
|
746
751
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: odsbox
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.17rc495.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=e8-KiaWQo7nYP9Mjz-YxTeZXRm5MHoPztYTtiqDORUk,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=SJR5Jd6YdUm_Jy-69N9WEkVJa_aQeREzjYaM2_KY9XA,39135
|
|
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.17rc495.post1.dist-info/licenses/LICENSE,sha256=uVaF5FulCvEj-4fhJv3DiM2KyjqLeeHNh1agjmaOS1s,1133
|
|
28
|
+
odsbox-1.0.17rc495.post1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
29
|
+
odsbox-1.0.17rc495.post1.dist-info/METADATA,sha256=Tdo9k6aqZvBmNZJze_sLn4mA-4i46l7EW_su44rrBXA,7106
|
|
30
|
+
odsbox-1.0.17rc495.post1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|