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.1.tar.gz
(4.4 kB
view details)
Built Distribution
File details
Details for the file servc-lake-1.0.1.tar.gz
.
File metadata
- Download URL: servc-lake-1.0.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8e7f799cd76ea5362a0047cdc2d416589d8afbfc970f40a145bf6f54d80421c |
|
MD5 | 5a77ca105ac0d97f27c491a88edfe3b2 |
|
BLAKE2b-256 | 8aaf682240aa91fa52fb74b251802b01fbbf42813a33a3e540cf9cde2941e6ef |
File details
Details for the file servc_lake-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: servc_lake-1.0.1-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 | 1de7a7608aff2d0efd27d9c86d2374783b2f4b0e3cac380044acc862b1b691c0 |
|
MD5 | b11a30b6644c606bc58ed2e0789f955f |
|
BLAKE2b-256 | beccfaaf6900526e971aba8b0828f17dbdd4fa8697f350ff8a9a681716d54e12 |