Streamlit Faker

0.0.4 · active · verified Thu Apr 16

streamlit-faker is a Python library designed to easily fake Streamlit commands. It allows developers to quickly draft a user interface or use it as a QA tool by generating random parameters for Streamlit functions, streamlining the prototyping process. It is built upon the popular `faker` project. The current version is 0.0.4, and it has an active, though not rapid, release cadence.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to instantiate `streamlit-faker` and use it to render various Streamlit UI elements with randomly generated content. Run this script with `streamlit run your_app.py`.

import streamlit as st
from streamlit_faker import get_streamlit_faker

st.title("Streamlit Faker Demo")

st_faker = get_streamlit_faker(seed=42) # Optional: set a seed for reproducible fake data

st.subheader("Faked UI Elements:")
st_faker.markdown()
st_faker.selectbox()
st_faker.slider()
st_faker.map()
st_faker.button("Faked Button")

st.info("This entire section was generated with fake data using streamlit-faker.")

view raw JSON →