How to use
- Install the package into your environment:
pip install streamlit-report
- Call the report class in your program:
from streamlit_report import report
r = report.Report()
- For supported functions, replace st. with r. and the Report class will call the streamlit function and write to your report simultaneously.
- Call the download method to add a button to toggle report generation and download:
r.download()
- 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.1.0
- Added plotly support
r.plotly_chart(chart)
- Added question-mark hover text
r.help_text("# Section header", "Explanation that reveals key insights")
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
Metadata
Release files for streamlit-report 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| streamlit_report-0.1.0.tar.gz | 19.6 kB | Without provenance | Details for streamlit_report-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| streamlit_report-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for streamlit_report-0.1.0-py3-none-any.whl |
Total release size: 41.0 kB
Release files / streamlit_report-0.1.0.tar.gz
| Download URL | streamlit_report-0.1.0.tar.gz |
|---|---|
| Size | 19.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
380c364eaec7f6153973d936bf427ff5c4bbf0f143ddd845173243316b166cea
|
|
BLAKE2b-256 checksum How to use checksums |
f8f5c0b0d82820a345c91cb44363803b1d86b625af9c50d24d4222d33dcb15f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / streamlit_report-0.1.0-py3-none-any.whl
| Download URL | streamlit_report-0.1.0-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af025334dc9d33d3ea00bd836ddac299f75d96e9d527a4017475f35adc73d286
|
|
BLAKE2b-256 checksum How to use checksums |
5b94594b681599b0fe7195c243bf6fe7b3a60cd265f8f093818a534463f02359
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for streamlit-report 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.