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.3.tar.gz
(4.6 kB
view details)
Built Distribution
File details
Details for the file servc-lake-1.0.3.tar.gz
.
File metadata
- Download URL: servc-lake-1.0.3.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d32c3cda1f5bcfb371f6fdccd9522a1092d4105aafe1e565848125c68a7a232 |
|
MD5 | 9ae0746b7b3ec0aaf2b310e8b46ba8b0 |
|
BLAKE2b-256 | 0cf2bc2ec5764cc9e18ef37d51f7a7c0c15c949f2bc97c1289f66ab6a497527b |
File details
Details for the file servc_lake-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: servc_lake-1.0.3-py3-none-any.whl
- Upload date:
- Size: 4.1 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 | 8fe9a1471152a1e9a30e3f6eac682fdeb5914a406dfedfc2666aef55f738eb95 |
|
MD5 | f78077070ca95b4906039decd732b06f |
|
BLAKE2b-256 | 36e1647445a4e48b54f751d7ef438aadb6b55cdce29923a6d5e26eb129b95400 |