Skip to main content

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 -k results_output --snapshot-update

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

pysisu-0.3.9.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

pysisu-0.3.9-py3-none-any.whl (44.8 kB view details)

Uploaded Python 3

File details

Details for the file pysisu-0.3.9.tar.gz.

File metadata

  • Download URL: pysisu-0.3.9.tar.gz
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pysisu-0.3.9.tar.gz
Algorithm Hash digest
SHA256 8e706a686133ebc99b054b5579aaed0b6671b9e9c945aed128e43edd1c557e1c
MD5 6afab1948fb966211758be16d7625e9b
BLAKE2b-256 58d385143889083a27d93f5a39b1b5da6002374071da6cbe4de688e380fe4759

See more details on using hashes here.

File details

Details for the file pysisu-0.3.9-py3-none-any.whl.

File metadata

  • Download URL: pysisu-0.3.9-py3-none-any.whl
  • Upload date:
  • Size: 44.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pysisu-0.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 36a1df71bc9bad9c7e88a81d790e4ea974d23cd8542e6aa74e7825ac8d5d3996
MD5 7d48b8da99d7f3f6eba3b3c9e98ce2bf
BLAKE2b-256 5bf6a554045768b1efd0cf792238c4c432b62797020b545b40d68176d8bd3c38

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page