Skip to main content

Survey components for Streamlit apps

Project description

Lifecycle: experimental Documentation on Streamlit Package on PyPI

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:

example-screenshot.png

Error auditing toy example for machine learning applications:

error-auditing-screenshot.png

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:

streamlit-survey-screenshot.png

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:

Streamlit-Survey Documentation

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

streamlit_survey-1.0.2.tar.gz (210.0 kB view details)

Uploaded Source

Built Distribution

streamlit_survey-1.0.2-py2.py3-none-any.whl (14.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file streamlit_survey-1.0.2.tar.gz.

File metadata

  • Download URL: streamlit_survey-1.0.2.tar.gz
  • Upload date:
  • Size: 210.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for streamlit_survey-1.0.2.tar.gz
Algorithm Hash digest
SHA256 cb13e9f5128c5c80f02e060e25b0ef2b6e1600f6aa3436788303ce34b7e6e64e
MD5 1cca56ce5aa42d9c6d21a6f3d41dbfdb
BLAKE2b-256 a76c5b420ecf63e68ff1866053ce20c224ed763c9108ffe63721810e5f730f34

See more details on using hashes here.

File details

Details for the file streamlit_survey-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_survey-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 37d1bd29403bbc630253db3b36639fad933f50a292d9f4678781308f387ee2b8
MD5 d96572bc27118efcda19b3371d825f37
BLAKE2b-256 b0f3aeb4358a076331ffdb06727376fcaa79bb4e51a6f563b7da34e6c791a20e

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