Python project setup using a Devcontainer and uv.
- Devcontainer running Python 3.13
- uv for dependency management and virtual environment management
- pytest for testing
- ruff for formatting and linting
- GitHub Actions for CI/CD
- Dockerfile for easy deployment
-
Use this template
Create a new repository based on this template.
-
Clone repo
Open the repo in VSCode.
-
Reopen in Container
Click the button in the popup upon opening the repo:
Alternatively, enter Ctrl+Shift+P and select Dev Containers: Reopen in Container.
-
Wait for setup to finish
Upon opening the Devcontainer, setup will start. Wait for the setup to finish before continuing.
-
Select Python interpreter
Enter Ctrl+Shift+P and select Python: Select Interpreter.
Select the venv (
./.venv/bin/python
). -
Enjoy 🫶
You now have a fully configured Python development environment!
with
uv
:and
pytest
:UI Terminal ... and
ruff
:all readily available 🎉
-
CI/CD with GitHub Actions
A workflow is already set up for you.
This workflow runs tests using
pytest
and formatting + linting usingruff
. Dependencies are set up withuv
. -
Dockerfile
A Dockerfile is provided for easy deployment. This Dockerfile uses the same base image as the Devcontainer, so you can be sure it will work in production.
Provided to you with ♡ by Jeroen Overschie.