Pyplatform-datalake package provides functions for Google Cloud Storage and Microsoft Storage services.
Project description
Pyplatform-datalake package provides functions for Google Cloud Storage and Microsoft Storage services.
Installation
pip install pyplatform-datalake
Authentication and environment variables
Refer to main page for documentation on authentication
Exploring the modules
from pyplatform.datalake import *
show_me()
Usage
uploading in-memory data to Google Cloud Storage
import pyplatform.datalake as dlk
from io import BytesIO
# df #TODO create dataframe as source
in_mem_file = BytesIO()
df.to_excel(in_mem_file,index=False)
in_mem_file.seek(0)
dlk.gcs_upload_blob(in_mem_file,bucket_id='bucket',blobname='test.xlsx')
downloading and loading trained forecasting model from Google Cloud Storage
import pyplatform.datalake as dlk
from io import BytesIO
import pickle
gcs_uri = 'gs://bucket/folder_name/model_name'
model_name="fbprophet_forecast_daily"
dlk.gcs_download_blob(gcs_uri,filepath=model_name)
with open(model_name,"rb") as model:
my_model=pickle.load(model)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pyplatform-datalake-2020.8.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 465d0865268ad3d335b46831b26f8c395cbe2e4abf5abecea964454da146c944 |
|
MD5 | 75633cd26d03d460a151e7123f3f247d |
|
BLAKE2b-256 | 31b2b10f008553069550f8970a2db5c47458bed4d3ab725851eea8aa74f6461e |
Close
Hashes for pyplatform_datalake-2020.8.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6879727a985580fd5e6b508f2de09c4a308d77304b07e97a09d0759e38e422a |
|
MD5 | b41104fd42741e5d551647b6ee0b6339 |
|
BLAKE2b-256 | a626d05d0f48eb6a536fd9210ba6d68e0fc3dd782e59174083e8385e78624253 |