Riot Python Environments

April 22, 2026 · View on GitHub

A VS Code extension that brings riot virtual environments into the Python Environments UI. Select a riot environment, run tests from the sidebar, get per-file code lenses, and let the extension handle service containers for you.

https://github.com/user-attachments/assets/b3920bbc-c7b5-4c14-8fdc-4f067fcdd777

Getting Started

Install the Extension

Download the latest .vsix from the GitHub Releases page, then install it:

code --install-extension riot-python-environments-*.vsix

Or through the UI: Extensions panel → ... menu → Install from VSIX.

Then enable the Python Environments extension in your settings:

"python.useEnvironmentsExtension": true

The extension activates automatically when a riotfile.py is detected in your workspace.

The VSIX ships with its own bundled rt runtime, so no separate install is needed to use the extension.

(Optional) Install the CLI

If you also want to run rt from your terminal, install it with your preferred tool manager:

# uv (recommended)
uv tool install "git+ssh://git@github.com/florentinl/rt.git"

# pipx
pipx install "git+ssh://git@github.com/florentinl/rt.git"

Verify it works:

rt --help

Features

Environment Picker

Select any riot environment through Python: Set Project Environment. The extension discovers every venv defined in your riotfile, builds it on demand, and wires it into VS Code as the active interpreter.

Test UI Integration

When you select an environment, the extension configures python.testing.pytestArgs automatically so the VS Code test sidebar picks up the right pytest target. Run, debug, and re-run tests without leaving the editor.

Code Lenses

Test files (tests/**/test_*.py) get a clickable code lens allowing to select the riot environments that apply. Click it to quick-pick an environment scoped to that file.

Service Containers

Environments that declare services in tests/suitespec.py (including the testagent snapshot service) are wired up automatically. The extension injects a pytest plugin that starts and stops the right containers around your test run.

Commands

Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P) and type Riot to see:

CommandDescription
Riot: Force Reinstall Selected EnvironmentTears down and rebuilds the currently selected environment from scratch. Useful after changing native dependencies or when the venv is in a bad state.
Riot: Refresh Riot Venv IndicatorsRe-scans test files and updates the code lenses. Run this after editing riotfile.py or adding new test files.
Riot: Select Riot Environment for Current FileShows a quick-pick of environments whose pytest target matches the file you have open.