Base repo for data experimentation with streamlit, plotly and duckdb
Will generate the needed setup for fast data experimentation:
- Poetry configuration
- Installation of streamlit, plotly and duckdb
- In docker and with docker-compose
- A simple app as an example
- Pre-commit
- Pytest
This cookie-cutter is intended to be the starting point for data experimentation. The main use-case is focused on working with non-private data, which can easily be worked with on local systems, for example data from the space, weather data and the likes.
If your use-case is about private data, I recommend avoid using the data
folder the cookiecutter comes with.
Easy, out of the box, web application for data analytics: https://docs.streamlit.io/ Alternative:
- dash, https://dash.plotly.com/
Graphing library, with better graphs than streamlit: https://plotly.com/python/
In-memory OLAP database: https://duckdb.org/docs/
This cookiecutter is inspired from https://github.com/fpgmaas/cookiecutter-poetry .
pip install cookiecutter
- Inside the repository directory execute
cookiecutter https://github.com/acirtep/cookiecutter-data-experimentation.git
- Go through the questions and add the port of choice for your application
- Inside the repository directory make sure to use python > 3.11
poetry env use ...
- Run
poetry install
docker compose up
orstreamlit run ./demo_cookiecutter_data_experimentation/app.py
- Go to http://0.0.0.0:port of choice
- A "hello world" Streamlit app is running
- for tests run locally
pytest -v
- Create an empty repository on your git hosting, preferably with the same name as the project_name used above.
- Follow the steps for an empty repository, from within the above directory
git init -b main
git add .
git commit -m "feat: initial setup from cookiecutter"
git remote add origin **git https link**
git branch --set-upstream-to=origin/main main
git push -u origin main
git remote set-head origin main
pre-commit install --hook-type commit-msg --hook-type pre-push
pre-commit run --all-files