Survey components for Streamlit apps
Project description
Streamlit-Survey: Survey components for Streamlit apps
Streamlit-Survey is a Python package for incorporating surveys and structured feedback into Streamlit apps.
It can be used with Trubrics to collect feedback on datasets, models, and machine learning apps.
Installation
Streamlit-Survey can be installed from PyPI:
pip install streamlit-survey
Example
Simple paged survey example with a conditional structure and a submit button:
Error auditing toy example for machine learning applications:
Usage
The streamlit_survey package contains a StreamlitSurvey class that can be used to create and manage survey components:
import streamlit_survey as ss survey = ss.StreamlitSurvey()
Components can be added to the survey using functions similar to Streamlit’s input functions:
Features
Survey components are similar to Streamlit inputs, but they have additional features that make them suitable for surveys:
Questions and responses are automatically saved.
Component states and previous responses are automatically restored and displayed based on survey data.
Survey can be saved to and loaded from JSON files.
Custom survey components can be created for more complex input UI and functionality.
Customizable paging and option to show a progress bar.
Read the docs:
License
Commons Clause + Apache 2.0
History
1.0.0 (2024-08-08)
Fix button customization in paged surveys.
Add progress bar option to pages.
Add option to pass a list to Page’s constructor, in order to both have the current page number and an associated value.
Add survey download button and file importer.
Add “widget_key” to survey data to help restore survey data for displayed widgets.
0.1.0 (2023-03-23)
First release.
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
Built Distribution
File details
Details for the file streamlit_survey-1.0.1.tar.gz
.
File metadata
- Download URL: streamlit_survey-1.0.1.tar.gz
- Upload date:
- Size: 209.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 077b9a64eac6fb1077156979e43019b35b9df5f571e3cbcd1fe8c2a6ac88fac8 |
|
MD5 | ceb9d8eca96f11972fdd35adce174af0 |
|
BLAKE2b-256 | 0a064bf560927743f80746c08bbce87f4ae3a816770d0a46fa8806908d95b5ae |
File details
Details for the file streamlit_survey-1.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: streamlit_survey-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 107cd582e66424086d80714f585bfbe3b02e82f0e0a3db9d78d53e65241aaae1 |
|
MD5 | cb119d46dae3508d2ffe24d8bc76c011 |
|
BLAKE2b-256 | 054446e665184b4705d6b4933f8f220e30b6be20426ea04fd4b350b162f69920 |