Shimoku docs
Search…
AWS S3
One can create a Data App directly from S3 with Pandas, boto3 and Shimoku in barely 20 lines of code:
import io
import os
import boto3
import pandas as pd
import shimoku_api_python as Shimoku
os.environ["AWS_ACCESS_KEY_ID"] = "xxxxxxxx"
os.environ["AWS_SECRET_ACCESS_KEY"] = "xxxxxxxx"
# Extract from S3
s3_client = boto3.client('s3')
response = s3_client.get_object(Bucket="my_bucket",Key="filename.txt")
file = response["Body"]
df = pd.read_csv(file, header=14, delimiter="\t", low_memory=False)
shimoku = Shimoku.Client(
config={'access_token': getenv('SHIMOKU_TOKEN')},
universe_id=getenv('UNIVERSE_ID'),
)
# Load data to Shimoku
shimoku.plt.line(
data=df, x='status', y=['total'],
menu_path='Cube',
)
Last modified 4mo ago
Copy link