Streamlit Simple Gallery
A simple gallery for use in Streamlit projects. Check out the demo using the Streamlit Cloud button above.
Installation
Installation is available via pip:
pip install streamlit-simple-gallery
Usage
Using the gallery is simple, import streamlit_simple_gallery and then instantiate the class with the
required directory variable. Other options can be configured by passing in different variables
when instantiating the class.
directory(required): Astr()of the path to the folder containing the gallery images, for example,"assets".expanded(optional): Abool(), passingFalsestarts the expander type gallery closed, default is open andTrue.file_extensions(optional): Atuple()containing strings of the file extensions to include in the gallery, default is(".png", ".jpg", ".jpeg").gallery_type(optional): Astr()with either "container" or "expander" used as the keyword, the default is"container"`.label(optional): Astr()containing the name of the gallery, passingNonedisables the label. The default value is"Gallery".number_of_columns(optional): Anint()defining the number of required columns, default is5.show_filenames(optional): Abool(), passingTruedisplays the filenames, the default isFalsewhich hides them.
import streamlit as st
from streamlit_simple_gallery import ImageGallery
st.set_page_config(page_title="Streamlit Gallery", layout="wide")
default_gallery = ImageGallery(directory="assets")
gallery_with_columns = ImageGallery(directory="assets", label="**Gallery - Columns**", number_of_columns=3)
expander_gallery = ImageGallery(directory="assets", expanded=True, gallery_type="expander", label="**Gallery - Expander**")
multiple_options_gallery = ImageGallery(directory="assets", gallery_type="expander", label="**Gallery - Multiple Options**", number_of_columns=3, show_filename=False)
To run the example application provided in the repository:
git clone https://github.com/hreikin/streamlit-simple-gallery
cd streamlit-simple-gallery/example/
python -m venv .venv
source .venv/bin/activate
pip install streamlit-simple-gallery
streamlit run Home.py
Metadata
Release files for streamlit-simple-gallery 0.0.4
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 | |
|---|---|---|---|---|
| streamlit_simple_gallery-0.0.4.tar.gz | 4.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| streamlit_simple_gallery-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.4 kB
Release files / streamlit_simple_gallery-0.0.4.tar.gz
| Download URL | streamlit_simple_gallery-0.0.4.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
265a875d9f4a1fd847fbf4f7b0657f2a2c5bbcc9f109a9472f9e6bdfd3df1e34
|
|
BLAKE2b-256 checksum How to use checksums |
b9ba6c06e24c9c85ddb23aa01f5eabaeafc16720991dc78587ca6b048821eb53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / streamlit_simple_gallery-0.0.4-py3-none-any.whl
| Download URL | streamlit_simple_gallery-0.0.4-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36eda410ea3d9f498d0178df67e6b3a250b81749de7c89ff8709aec16dde3203
|
|
BLAKE2b-256 checksum How to use checksums |
04e7009aa795f8fb53c003f07d105c82f0e44953ac53ecdd5bccf7c4d286c139
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for streamlit-simple-gallery 0.0.4
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.