No project description provided
Project description
pysisu
pysisu
is a Python package that will query the Sisu API and convert results into a tabular format.
Overview and Example
Take a look at example_usage.py
for a simple example.
from pysisu import PySisu
import os
API_KEY = os.environ.get('SISU_API_KEY')
ANALYSIS_ID = 13234
sisu = PySisu(API_KEY)
table = sisu.get_results(ANALYSIS_ID, {"top_drivers": "True"})
print(','.join([x.column_name for x in table.header]))
for row in table.rows:
print(row)
The API limits its response to 100 results per response, via pagination. However, there is a flag for auto_paginate
that will continuously fetch for any limit you set.
Contributing to protos
Currently (06/21/2022) betterproto only supports optional
in beta, so please install the most recent beta version of better proto.
pip install betterproto==2.0.0b4
Follow the install instructions here: https://grpc.io/docs/protoc-installation/
Then to generate the proto api run the following command.
protoc -I . --python_betterproto_out=. api.proto
Local development
python -m pip install -e .
export SISU_API_KEY=<key>
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
pysisu-0.0.16.tar.gz
(13.3 kB
view hashes)
Built Distribution
pysisu-0.0.16-py3-none-any.whl
(16.9 kB
view hashes)