https://github.com/dunnkers/python-uv-devcontainer
Python project setup using a Devcontainer and uv.
https://github.com/dunnkers/python-uv-devcontainer
astral-uv devcontainer devcontainer-features devcontainer-template devcontainers python python3 ruff uv
Last synced: 9 months ago
JSON representation
Python project setup using a Devcontainer and uv.
- Host: GitHub
- URL: https://github.com/dunnkers/python-uv-devcontainer
- Owner: dunnkers
- Created: 2025-04-22T20:23:53.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-04-23T16:34:31.000Z (9 months ago)
- Last Synced: 2025-04-23T22:15:09.440Z (9 months ago)
- Topics: astral-uv, devcontainer, devcontainer-features, devcontainer-template, devcontainers, python, python3, ruff, uv
- Language: Dockerfile
- Homepage:
- Size: 4.81 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# python-uv-devcontainer
Python project setup using a [Devcontainer](https://containers.dev) and [uv](https://github.com/astral-sh/uv).
## Features
- [x] [Devcontainer](https://github.com/devcontainers/images/tree/main/src/python) running Python 3.13
- [x] [uv](https://github.com/astral-sh/uv) for dependency management and virtual environment management
- [x] [pytest](https://docs.pytest.org/en/stable/) for testing
- [x] [ruff](https://github.com/astral-sh/ruff) for formatting and linting
- [x] [GitHub Actions](https://github.com/dunnkers/python-uv-devcontainer/actions) for CI/CD
- [x] [Dockerfile](https://github.com/dunnkers/python-uv-devcontainer/blob/main/Dockerfile) for easy deployment
## Setup
1. **Clone this repo**
2. **Reopen in Container**
Click the button in the popup upon opening the repo:
![alt text]()
Alternatively, enter Ctrl+Shift+P and select **Dev Containers: Reopen in Container**.
3. **Wait for setup to finish**
Upon opening the Devcontainer, setup will start. Wait for the setup to finish before continuing.
![alt text]()
4. **Select Python interpreter**
Enter Ctrl+Shift+P and select **Python: Select Interpreter**.

Select the **venv** (`./.venv/bin/python`).
5. **Enjoy 🫶**
You now have a fully configured Python development environment!
![alt text]()
with `uv`:

and `pytest`:
| UI | Terminal |
|:--:|:--:|
| ![alt text]() | ![alt text]() |
... and `ruff`:

all readily available ✓.
- **CI/CD with GitHub Actions**
[A workflow](https://github.com/dunnkers/python-uv-devcontainer/blob/main/.github/workflows/python_app.yaml) is already set up for you.
![alt text]()
The workflow sets up your project with `uv` and runs `pytest` and `ruff`.
🎉
Good luck developing! 🍀
## About
Provided to you with ♡ by [Jeroen Overschie](https://jeroenoverschie.nl/).