containerio 2.3.1__tar.gz → 2.3.2__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.
- {containerio-2.3.1 → containerio-2.3.2}/PKG-INFO +1 -1
- {containerio-2.3.1 → containerio-2.3.2}/pyproject.toml +1 -1
- {containerio-2.3.1 → containerio-2.3.2}/src/containerio/handler.py +5 -17
- {containerio-2.3.1 → containerio-2.3.2}/README.md +0 -0
- {containerio-2.3.1 → containerio-2.3.2}/src/containerio/__init__.py +0 -0
- {containerio-2.3.1 → containerio-2.3.2}/src/containerio/azure_config.py +0 -0
- {containerio-2.3.1 → containerio-2.3.2}/src/containerio/session.py +0 -0
- {containerio-2.3.1 → containerio-2.3.2}/src/containerio/tools/cli.py +0 -0
|
@@ -684,12 +684,8 @@ class StorageHandler:
|
|
|
684
684
|
pl.DataFrame: The content of the JSON file as a Polars
|
|
685
685
|
DataFrame.
|
|
686
686
|
"""
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
return pl.read_json(source=file_path, **kwargs)
|
|
690
|
-
else:
|
|
691
|
-
data = self._read_blob_as_bytes(blob_name)
|
|
692
|
-
return pl.read_json(source=BytesIO(data), **kwargs)
|
|
687
|
+
data = self.read_blob_as_bytes(blob_name=blob_name)
|
|
688
|
+
return pl.read_json(source=BytesIO(data), **kwargs)
|
|
693
689
|
|
|
694
690
|
def read_csv_blob(self, blob_name: str, **kwargs: Dict) -> pl.DataFrame:
|
|
695
691
|
"""Reads a CSV file from storage into a Polars DataFrame.
|
|
@@ -900,17 +896,9 @@ class StorageHandler:
|
|
|
900
896
|
Returns:
|
|
901
897
|
None
|
|
902
898
|
"""
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
df.write_json(file=file_path, **kwargs)
|
|
907
|
-
else:
|
|
908
|
-
# Write the DataFrame to an in-memory stream
|
|
909
|
-
buffer = BytesIO()
|
|
910
|
-
df.write_json(file=buffer, **kwargs)
|
|
911
|
-
buffer.seek(0)
|
|
912
|
-
# Upload the bytes to Azure Blob Storage
|
|
913
|
-
self._write_blob_as_bytes(blob_name, buffer.getvalue())
|
|
899
|
+
buffer = BytesIO()
|
|
900
|
+
df.write_json(file=buffer, **kwargs)
|
|
901
|
+
self.write_blob_as_bytes(blob_name=blob_name, data=buffer.getvalue())
|
|
914
902
|
|
|
915
903
|
def write_csv_blob(self, blob_name: str, df: pl.DataFrame, **kwargs: Dict) -> None:
|
|
916
904
|
"""Writes a Polars DataFrame to a CSV file in storage.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|