A simple wrapper to send a request to a SIS webservice endpoint and return a list of python dictionaries
- Reads the token file, builds the correct auth header.
- Accepts filter options and sends request(s) to the SIS web service endpoint and fetches data across all the pages.
- Extracts information from the JsonAPI document. Reads the "data" and "included" sections and flattens it into a python dictionary.
- Runs client side filters and custom sorts defined by user.
- Returns a list of python dictionaries.
- The base class does bulk of the work.
- Use subclasses to define values for endpointurl and allowed filters
Do a local build and install it. First activate your virtualenv if using it. Then in project root run:
python3 -m pip install -e .
Save your sis api token to a file and put in path to the token in the ini file (examples/sis_api.ini)
- View example1.py for function based examples
- View example2.py for object oriented examples
To run example s1 with data from the sistest instance
python3 examples/example1.py examples/sis_api.ini test s1
OR
python3 examples/example2.py examples/sis_api.ini test s1
If you'd like to transform any of the data from SIS, we recommend converting it to a pandas DataFrame with pandas.DataFrame(your_sis_data).