Skip to content
Skills Library
DevOps & cloud · Tool integration

python

/python

Use when configuring dev containers for Python projects. Covers the Python feature, virtual environments, tool installation, JupyterLab, and linter/formatter setup. USE FOR: Python dev container setup, Python feature configuration, virtual environments, JupyterLab, pip/uv/poetry tooling DO NOT USE FOR: .NET dev containers (use dotnet), TypeScript dev containers (use typescript), general devcontainer.json (use devcontainer)

Licence
MIT
Last repository change
09.06.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
13
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 09.06.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when configuring dev containers for Python projects. Covers the Python feature, virtual environments, tool installation, JupyterLab, and linter/formatter setup. USE FOR: Python dev container setup, Python feature configuration, virtual environments, JupyterLab, pip/uv/poetry tooling DO NOT USE FOR: .NET dev containers (use dotnet), TypeScript dev containers (use typescript), general devcontainer.json (use devcontainer)

Original author description

Use when configuring dev containers for Python projects. Covers the Python feature, virtual environments, tool installation, JupyterLab, and linter/formatter setup. USE FOR: Python dev container setup, Python feature configuration, virtual environments, JupyterLab, pip/uv/poetry tooling DO NOT USE FOR: .NET dev containers (use dotnet), TypeScript dev containers (use typescript), general devcontainer.json (use devcontainer)

How it works

  1. Overview
  2. Python Feature
  3. Full Example
  4. Using the Base Image vs Feature
  5. Virtual Environments
  6. JupyterLab
  7. Poetry / uv / PDM
  8. Best Practices
Original SKILL.md headings · 112 lines, 393 words
SKILL.md preview
---
name: python
description: |
    Use when configuring dev containers for Python projects. Covers the Python feature, virtual environments, tool installation, JupyterLab, and linter/formatter setup.
    USE FOR: Python dev container setup, Python feature configuration, virtual environments, JupyterLab, pip/uv/poetry tooling
    DO NOT USE FOR: .NET dev containers (use dotnet), TypeScript dev containers (use typescript), general devcontainer.json (use devcontainer)
license: MIT
metadata:
  displayName: "Dev Container — Python"
  author: "Tyler-R-Kendrick"
compatibility: claude, copilot, cursor
references:
  - title: "Dev Containers Specification"
    url: "https://containers.dev/"
  - title: "Python Official Documentation"
    url: "https://docs.python.org/3/"
---

# Dev Container — Python

## Overview
Configure a dev container for Python development using the official Python feature or base image. Supports version selection, tool installation via pipx, virtual environments, and JupyterLab.

## Python Feature
```jsonc
{
  "features": {
    "ghcr.io/devcontainers/features/python:1": {
      "version": "3.12"
    }
  }
}
```

### Feature Options
| Option | Default | Description |
|--------|---------|-------------|
| `version` | `latest` | Python version (`3.12`, `3.11`, `latest`, `os-provided`, `none`) |
| `installTools` | `true` | Install tools listed in `toolsToInstall` via pipx |
| `toolsToInstall` | `flake8,autopep8,black,yapf,mypy,pydocstyle,pycodestyle,bandit,pipenv,virtualenv,pytest,pylint` | Comma-separated tools |
| `installJupyterlab` | `false` | Install JupyterLab |
| `optimize` | `false` | Compile Python with optimizations (slower build) |
| `installPath` | `/usr/local/python` | Installation directory |

## Full Example
```jsonc
{
  "name": "Python 3.12 Development",
  "image": "mcr.microsoft.com/devcontainers/python:3.12",
  "features": {
    "ghcr.io/devcontainers/features/github-cli:1": {}
  },
  "forwardPorts": [8000],
  "portsAttributes": {
    "8000": { "label": "App", "onAutoForward": "notify" },
    "8888": { "label": "Jupyter", "onAutoForward": "notify" }
  },
  "postCreateCommand": "pip install -r requirements.txt",
  "customizations": {
    "vscode": {
      "extensions": [
        "ms-python.python",
        "ms-python.vscode-pylance",
        "ms-python.black-formatter",
        "charliermarsh.ruff"
      ],
      "settings": {
        "python.defaultInterpreterPath": "/usr/local/bin/python",
        "[python]": {
          "editor.defaultFormatter": "charliermarsh.ruff",
          "editor.formatOnSave": true
        }
      }
    }
  }
}
```

## Using the Base Image vs Feature
| Approach | When to Use |
|----------|-------------|
| `"image": "mcr.microsoft.com/devcontainers/python:3.12"` | Python-only projects |
| Base image + `ghcr.io/devcontainers/features/python:1` | Multi-language projects |

## Virtual Environments
```jsonc
{
  "postCreateCommand": "python -m venv .venv && . .venv/bin/activate && pip install -r requirements.txt",
  "containerEnv": {
    "VIRTUAL_ENV": "/workspace/.venv",
    "PATH": "/workspace/.venv/bin:${containerEnv:PATH}"
  }
}
```

## JupyterLab
```jsonc
{
  "features": {
    "ghcr.io/devcontainers/features/python:1": {
      "version": "3.12",
      "installJupyterlab": true
    }
  },
  "forwardPorts": [8888],
  "postStartCommand": "jupyter lab --ip=0.0.0.0 --no-browser --NotebookApp.token=''"
}
```

## Poetry / uv / PDM
For modern package managers, install them in `postCreateCommand`:
```jsonc
{
  "postCreateCommand": "pip install uv && uv sync",
  "containerEnv": {
    "UV_LINK_MODE": "copy"
  }
}
```

## Best Practices
- Use the dedicated `mcr.microsoft.com/devcontainers/python` image for Python-only projects.
- Pin the Python version to a minor release (`3.12`, `3.11`) for reproducibility.
- Prefer Ruff over separate flake8/black installs — it replaces multiple tools with a single fast one.
- Use `postCreateCommand` for `pip install` so dependencies are cached in Codespaces prebuilds.
- Set `python.defaultInterpreterPath` in VS Code settings to avoid interpreter selection prompts.
- For data science projects, enable `installJupyterlab` in the feature and forward port 8888.
- Use `containerEnv` to configure `VIRTUAL_ENV` if your project expects a venv.
Files in this package (13)
  • AGENTS.md 3 KB
  • README.md 1 KB
  • SKILL.md 4 KB
  • metadata.json 1 KB
  • rules/_sections.md 1 KB
  • rules/_template.md 1 KB
  • rules/python-for-data-science-projects-enable-installjupyterlab-in.md 1 KB
  • rules/python-pin-the-python-version-to-a-minor-release-3.md 1 KB
  • rules/python-prefer-ruff-over-separate-flake8-black-installs.md 1 KB
  • rules/python-set-python.md 1 KB
  • rules/python-use-containerenv-to-configure-virtual-env-if-your.md 1 KB
  • rules/python-use-postcreatecommand-for-pip-install-so-dependencies.md 1 KB
  • rules/python-use-the-dedicated-mcr.md 1 KB

Versions

RepositoryScoreLicence
This page · Tyler-R-Kendrick/agent-skills100MIT
ericrisco/rsc-harness100MIT
xobotyi/cc-foundry100MIT
nimadorostkar/Claude-Skills-collection100MIT
Aadarsh-x54/deep-agents-with-langchain100MIT
ahgraber/skills100CC0-1.0
appwrite/claude-plugin100BSD-3-Clause
claude-dev-suite/claude-dev-suite100MIT
G1Joshi/Agent-Skills100MIT

Database snapshot: 13.11.2026 · package version ef4b20a7eed6 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100typescript
    Use when configuring dev containers for TypeScript or Node.js projects. Covers the Node feature, package managers, ESLint/Prettier extensions, and frontend dev server setup. USE FOR: TypeScript/Node.js dev container setup, Node feature, npm/pnpm/yarn configuration,…
  • 88dev-loop-dev-container
    Use when the user asks about development containers, devcontainer.json, Dev Containers in VS Code/GitHub Codespaces, Docker-based dev environments, or reproducible development setups. Do NOT use for: production Dockerfiles, or CI/CD pipelines.
  • 100dotnet
    Use when configuring dev containers for .NET projects. Covers the dotnet feature, SDK versions, workloads, C# Dev Kit extensions, and NuGet configuration. USE FOR: .NET dev container setup, dotnet SDK feature, C# Dev Kit extensions, NuGet configuration, .NET workloads in…
  • 100devcontainer-setup
    Use when adding a devcontainer or isolated dev environment to a repo that lacks one, for Python, Node/TypeScript, Rust, Go, or a combination. Not for editing an existing devcontainer.
  • 90dev-environments
    Set up, configure, and maintain local/remote development environments. Use when: setup dev environment, configure docker compose, build devcontainer.
  • 100system-environment-setup
    Configure development and production environments for consistent and reproducible setups. Use when setting up new projects, Docker environments, or development tooling. Handles Docker Compose, .env configuration, dev containers, and infrastructure as code.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.