An online Python and SQL database playground for testing codes
- uv
- make
- Docker
- Python3.11
- Setup environment variables.
cp -i .streamlit/secrets.toml.example .streamlit/secrets.toml
- Note that instead of
.env
, we are usingsecrets.toml
located in the.streamlit
directory to store secrets for this project. - Uncomment and set a value for
APP_PWD
in.streamlit/secrets.toml
to test for password checking, otherwise leave - The default value for
DATABASE_URL
in.streamlit/secrets.toml
should match themake db
inMakefile
. Update if required to point to other database url.
- Run database and app
$ make db # run a Postgres db container in the background based on DATABASE_URL in .env $ make run # run the Streamlit app
Do not host app this online without password protection as the system environment variables are easily exposed via Python os module.