The purpose of this repository is to provide an initial project template for Streamlit apps that simplifies and speeds up development.
Create a virtual environment.
python -m venv .venv
Activate the virtual environment.
On Linux, macOS.
source .venv/bin/activate
python -m pip install --upgrade pip && \
pip install -r requirements-dev.txt
Start editing the app files in the app
directory with your favourite editor.
For more information on how to develop Streamlit apps, check Streamlit documentation.
Start the app with the streamlit run
command.
streamlit run app/main.py
Run the tests.
pytest
For more information on testing, visit pytest documentation.
The template is set up with Docker to deploy the app.
Configure the streamlit config.toml
to your needs.
When changing the default ports in the configuration, remember to also change them in
docker run
command.
Build the Docker image.
docker build -t streamlit-app .
Run the container.
docker run -dp 8501:8501 streamlit-app
Contributions are very welcome.
To contribute:
- Create an issue you would like to work on.
- Fork the repository.
- Create a pull request and attach the issue.
The initial streamlit config comes from the great Awesome Streamlit repository.