Skip to main content

No project description provided

Project description

How to use

  1. Install the package into your environment:
pip install streamlit-report
  1. Call the report class in your program:
from streamlit_report import report
r = report.Report()
  1. For supported functions, replace st. with r. and the Report class will call the streamlit function and write to your report simultaneously.
  2. Call the download method to add a button to toggle report generation and download:
r.download()
  1. Run your dashboard, click the Generate Report? button, navigate to each page, activate the content you'd like to add to your report, and click the Download! button when done. NOTE: the report overwrites a page's content each time you visit it on the dashboard.

Purpose

This module creates a streamlit page using standard streamlit commands and, when prompted, generates an html report that mirrors the dashboard's interactive contents. The final report stores the results that are displayed on the page and lives on as a static file that can be viewed without connecting to the dashboard.

Styles can be modified by changing the styles.html file. Current styles were based off references found on https://www.w3schools.com/.

Note

The below features are simplified representations of what the dashboard presents. Streamlit has features that are not and may never be implemented by this library. The purpose is to streamline a simple and static reporting mechanism without having to write additional code.

Version History

Version 0.0.7

  • updated default style.html file to improve dataframe display on reports
  • removed height & width functionality from r.dataframe commands
    • This can now be specified globally in the dataframe-container & dataframe CSS
  • removed dependency version requirements on imported modules

Version 0.0.6

  • updated support to account for migrated get_pages function in streamlit Version 1.44
  • fixed bug in multiselect code
  • added support for navigation based multipage applications
  • added some minor QoL updates via type hints

Version 0.0.4-alpha

  • added st.date_input support
  • added st.multiselect support
  • added st.text, st.text_area, st.text_input support
  • added st.slider support for range value selections

Version 0.0.3

  • Restructured repository layout
  • Reformatted the README.md file
  • Removed demo and related programs from the main branch
    • They still exist on the demo branch and are primarily used for the streamlit cloud demo page

Version 0.0.2

  • added functions removed from st_pages to restore page name detection
  • moved demo program and data to the examples folder

Version 0.0.1

Added basic functionality including multipage support, altair graphs, and some input data fields.

  • streamlit.write support for markdown and basic text
  • streamlit.markdown support -- allow_unsafe_html = True will write custom html code to the report
  • streamlit.tabs support using with generator functions
  • streamlit.sidebar support using with generator functions
  • collapsable sidebar
  • streamlit.altair_chart support
  • streamlit_report.Report.ignore flag to temporarily suppress writing to the report file
  • streamlit.dataframe support, displaying a polars or pandas dataframe in a sized window
  • streamlit.selectbox support, displaying the name of the item selected during report generation
  • streamlit.slider support for single value slider selections
  • report generation and download button for single page reports
  • multi-page app support
  • creation of single report for multi-page applications
  • option to specify the default page order that a report generates in

Planned Features

Priority items

  • Create distribution file
  • st.date_input
  • st.multiselect
  • st.text_input
  • st.text_area

Lower priority items

  • st.columns
  • st.text
  • button to reveal the collapsed sidebar
  • streamlit.slider support for multipoint values selections
  • improved style defaults
  • option to write to temporary files instead of storing the html code in memory

Needs review

  • st.form
  • st.image
  • st.logo
  • st.page_link
  • st.navigation
  • resizable sidebar
  • streamlit.write support for list, dictionary types
  • option to only replace page content when a button is pressed

Unsupported Features

  • pdf report option

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_report-0.0.7.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_report-0.0.7-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_report-0.0.7.tar.gz.

File metadata

  • Download URL: streamlit_report-0.0.7.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for streamlit_report-0.0.7.tar.gz
Algorithm Hash digest
SHA256 2df5c7722a1efdd2dae81b5c79312eed046091f1140b547e909736b012595c3a
MD5 f6148a46066f728f9eb62e47bc5c57eb
BLAKE2b-256 62ad5e943a654f788c7876a9ec9ecdee52b1bbc853b91f4d0f1126e8b8b2db7f

See more details on using hashes here.

File details

Details for the file streamlit_report-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_report-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c4dc0b31526a741b54f3c60894554cff2b6d821128502138b1f13bcff6836bf3
MD5 3c70e82fef141eddf725f735842b3cf3
BLAKE2b-256 d8814b58f6061c70bbb511a2cae42a02b677accb7e2a07653899bba946fb3c8f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page