{"id":7765,"library":"streamlit-faker","title":"Streamlit Faker","description":"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.","status":"active","version":"0.0.4","language":"python","source_language":"en","source_url":"https://github.com/arnaudmiribel/streamlit-faker","tags":["streamlit","faker","mocking","testing","prototyping","ui-development"],"install":[{"cmd":"pip install streamlit-faker","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core dependency for generating diverse fake data patterns for Streamlit commands.","package":"faker","optional":false},{"reason":"The underlying framework whose commands are being faked.","package":"streamlit","optional":false}],"imports":[{"note":"The primary entry point is the `get_streamlit_faker` function, not the module itself.","wrong":"import streamlit_faker","symbol":"get_streamlit_faker","correct":"from streamlit_faker import get_streamlit_faker"}],"quickstart":{"code":"import streamlit as st\nfrom streamlit_faker import get_streamlit_faker\n\nst.title(\"Streamlit Faker Demo\")\n\nst_faker = get_streamlit_faker(seed=42) # Optional: set a seed for reproducible fake data\n\nst.subheader(\"Faked UI Elements:\")\nst_faker.markdown()\nst_faker.selectbox()\nst_faker.slider()\nst_faker.map()\nst_faker.button(\"Faked Button\")\n\nst.info(\"This entire section was generated with fake data using streamlit-faker.\")","lang":"python","description":"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`."},"warnings":[{"fix":"Use for initial layout and visual feedback. For robust testing or complex logic, implement actual Streamlit components with specific test data or a dedicated testing framework.","message":"streamlit-faker is primarily designed for rapid prototyping and UI drafting. It generates plausible, but random, data and may not accurately reflect complex real-world Streamlit app behavior, especially concerning intricate user interactions, state management, or custom components.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Carefully review and explicitly define `key` arguments for stateful widgets and manage application state via `st.session_state` when replacing `streamlit-faker` calls with actual Streamlit API calls.","message":"When migrating from faked UI to real Streamlit components, ensure proper handling of widget keys (`key` parameter) and `st.session_state` to prevent unexpected behavior. The faked commands automatically handle some aspects, which need manual attention in real code.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade to v0.0.4 or later. Ensure your application does not directly or indirectly depend on `streamlit-extras` features that might have been implicitly provided by older `streamlit-faker` versions.","message":"Prior to v0.0.4, the library internally relied on `streamlit-extras`. This dependency was replaced with `altex`. While this was primarily an internal change, users relying on any indirectly exposed `streamlit-extras` functionality might need to adjust their assumptions about underlying components.","severity":"deprecated","affected_versions":"<0.0.4"}],"env_vars":null,"search_vec":"'0.0.4':55 'activ':60 'allow':17 'built':45 'cadenc':65 'command':15 'current':52 'design':10 'develop':18,73 'draft':21 'easili':12 'fake':13 'faker':2,5,49,67 'function':38 'generat':33 'interfac':24 'librari':9 'mock':68 'paramet':35 'popular':48 'process':42 'project':50 'prototyp':41,70 'python':8 'qa':30 'quick':20 'random':34 'rapid':63 'releas':64 'streamlin':39 'streamlit':1,4,14,37,66 'streamlit-fak':3 'test':69 'though':61 'tool':31 'ui':72 'ui-develop':71 'upon':46 'use':26 'user':23 'version':53","created_at":"2026-04-16T14:12:25.890021+00:00","updated_at":"2026-04-16T14:12:25.890021+00:00","problems":[{"fix":"Run `pip install streamlit-faker` to install the library.","cause":"The `streamlit-faker` package is not installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'streamlit_faker'"},{"fix":"Verify the Streamlit command name against the official Streamlit documentation. `streamlit-faker` aims to support common Streamlit commands but might not cover all edge cases or newly introduced APIs immediately.","cause":"Attempting to call a Streamlit command that does not exist or is not supported by the `streamlit-faker` wrapper.","error":"AttributeError: 'StreamlitFaker' object has no attribute 'non_existent_command'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.0.4","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/arnaudmiribel/streamlit-faker","docs":null,"changelog":null,"pypi":"https://pypi.org/project/streamlit-faker/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}