Server implmentation of services for python
Project description
servc-lake
Requirements
As per usual, this package does not come bundled with any libraries to ensure full flexibility on dependencies and security vulnerabilities.
$ pip install servc servc-lake [...pandas, pyarrow, etc.]
Documentation
Servc's documentation can be found https://docs.servc.ca
Delta Lake
Environment Variables
DATA_PATH - the location to start writing files. Default: /tmp/
Example
import pyarrow as pa
from servclake.delta import Delta
# create a deltalake instance
deltalake = Delta(
"/datalake",
[
{
"name": "mytesttable",
"schema": pa.schema([pa.field("col", pa.string()), pa.field("value", pa.int32())]),
"partition": "col",
}
]
)
# delcare our dataframe
df = pa.Table.from_pylist(
[
{"col": "df1", "value": 1},
{"col": "asd2", "value": 2},
{"col": "asd3", "value": 3},
{"col": "asd4", "value": 4},
{"col": "asd5", "value": 5},
],
schema=pa.schema([pa.field("col", pa.string()), pa.field("value", pa.int32())]),
)
# write dataframe to lake
table = self.lake.write("mytesttable", df, mode="append")
print(table.to_pandas())
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
servc-lake-1.0.2.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file servc-lake-1.0.2.tar.gz
.
File metadata
- Download URL: servc-lake-1.0.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1934a1cf4224d2ca70885a34a9ca91edb9902ccb92dab6b76f6a08ea521377d |
|
MD5 | e6c4411b364f079f4ee42796b59bf3ee |
|
BLAKE2b-256 | 95b0dd3805abe320aa393515454b06657c38ec249a0994943f9f4094fdcc36bd |
File details
Details for the file servc_lake-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: servc_lake-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 898b1f582d88baf9a79f4fe464670c4df94093ae97d007f121d5c1961e112f19 |
|
MD5 | 57b4b5a72bbd8e2ac0240646b1d5a332 |
|
BLAKE2b-256 | 2818507f69f4b9e931fe4550aafef379e3bed1c6696826d06afb26c43afc11f9 |