1.07 GB
9,780 files
Updated 7 months ago
Name
Size
.npmignore61 Bytes
xet
LICENSE.md1.1 kB
xet
README.md925 Bytes
xet
SECURITY.md2.83 kB
xet
package-lock.json1.42 kB
xet
package.json1.37 kB
xet
README.md

@vscode/python-environments

This package provides type declarations and a helper to access the API exposed by the Python Environments extension for VS Code.

Usage

  1. Install the package and add an extensionDependencies entry in your extension's package.json:
// package.json
{
    "extensionDependencies": ["ms-python.vscode-python-envs"]
}
  1. Install the npm package:
npm install @vscode/python-environments
  1. Import and use the API in your extension:
import { PythonEnvironments } from '@vscode/python-environments';

export async function activate() {
    const api = await PythonEnvironments.api();

    // Get all discovered environments
    const envs = await api.getEnvironments('all');
    for (const env of envs) {
        console.log(env.displayName, env.version);
    }
}
Total size
1.07 GB
Files
9,780
Last updated
May 2
Pre-warmed CDN
US EU US EU

Contributors