An open API service indexing awesome lists of open source software.

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.

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**

Clone repository
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**.

VSCode: 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/).