Install uv
: https://docs.astral.sh/uv/getting-started/installation/
git init
uv sync
git add .
git commit -m "Initial commit"
uv run pre-commit install # optional
To execute your software run:
uv run main.py
Just run uv run main.py
and you are good to go!
pre-commit is a set of tools that help you ensure code quality. It runs every time you make a commit. To install pre-commit hooks run:
uv run pre-commit install
Run uv add <package-name>
to install a package. For example:
uv add requests
If you are using visual studio code install the recommended extensions
A basic docker image is already provided, run:
docker compose watch
- uv
- pre-commit (optional)
Environment variables are variables that are not populated in your code but rather in the environment that you are running your code. This is extremely useful mainly for two reasons:
- security, you can share your code without sharing your passwords/credentials
- portability, you can avoid using hard-coded values like file-system paths or folder names
you can place your environment variables in a file called .env
, the main.py
will read from it. Remember to:
- NEVER commit your
.env
- Keep a
.env.example
file updated with the variables that the software expects