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)
sisu.run(ANALYSIS_ID)
table = sisu.get_results(ANALYSIS_ID)
table.to_csv()
The API limits its response to 10000 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.
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>
Testing
Setup
python3 -m venv env
python -m pip install -e .
pip install -r requirements-dev.txt
There are example api responses in tests/input_snapshots
and there are the expected parsing responses in tests/output_snapshots
.
To updated the output snapshots whenever the input snapshots get updated, just run
pytest . --snapshot-update
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
File details
Details for the file pysisu-0.2.4.tar.gz
.
File metadata
- Download URL: pysisu-0.2.4.tar.gz
- Upload date:
- Size: 31.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e45e8ee0a866ebe1936fd3ee97a489dd51bbbc3090aeee677dabdecd71284c3e |
|
MD5 | 79d8dbc0a97eb4f1d8dba6e5ce840823 |
|
BLAKE2b-256 | c19842c9bc6a6e1e9b9ee8ba2050c89834cb369e94f58bb9dfa983fa47acb34d |
File details
Details for the file pysisu-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: pysisu-0.2.4-py3-none-any.whl
- Upload date:
- Size: 35.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 636793fd8d6def2c404da400555c38af32b2e456bcb0958a537cf9447ce65def |
|
MD5 | 3a9ea0ca912943572ca21c5a9bcaa9ea |
|
BLAKE2b-256 | 88a11203891a838848f56d7f8ae0939774e4ff7d08ffe4ae810341dba3808aaf |