Survey Solutions API Wrapper
Project description
SSAW: Python wrapper for the Survey Solutions HTTP API
Read more about Survey Solutions at https://mysurvey.solutions
Details on API at https://demo.mysurvey.solutions/apidocs/index
Quickstart
Install SSAW:
pip install ssaw
Initialize connection with the server:
import ssaw
client = ssaw.Client('https://demo.mysurvey.solutions', 'api_user', 'api_password')
Get list of questionnaires:
for q in ssaw.QuestionnaireApi(client).get_list():
print(q.title)
Download latest export file in SPSS format:
from ssaw import ExportApi
# without export_path parameter file will be saved in the current working directory
filename = ExportApi(client).get(export_type="SPSS", questionnaire_identity="64136490cbc24a71a1df10f4b7115599$1")
Create new assignment:
from ssaw.models import Assignment
from ssaw import AssignmentsApi
identifying_data = [
{"Variable": "address", "Answer": "123 Main Street"},
{"Variable": "name", "Answer": "Jane Doe"}
]
newobj = Assignment(
responsible="inter1",
questionnaire_id="",
quantity=5,
identifying_data=identifying_data)
res = AssignmentsApi(client).create(newobj)
print(res.id)
Get list of interviews that were updated during last 15 minutes (using GraphQL)
import datetime
from ssaw import InterviewApi
timestamp = datetime.datetime.now() - datetime.timedelta(minutes=15)
for i in InterviewsApi(client).get_list(update_date_gt=timestamp):
print(i)
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
ssaw-0.0.8.tar.gz
(17.1 kB
view hashes)
Built Distribution
ssaw-0.0.8-py3-none-any.whl
(21.6 kB
view hashes)