Buckets:
Sleepyfx/my-trading-vscode / vscode /code-server /extensions /ms-python.vscode-python-envs-1.28.0-universal /pythonEnvironmentsApi
1.07 GB
9,780 files
Updated 7 months ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| package.json | 1.37 kB xet | 3edad099 | |
| package-lock.json | 1.42 kB xet | c606e1c0 | |
| SECURITY.md | 2.83 kB xet | 827efb29 | |
| README.md | 925 Bytes xet | 8aa1da0b | |
| LICENSE.md | 1.1 kB xet | 5c6a244d | |
| .npmignore | 61 Bytes xet | b2cb549f |
@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
- Install the package and add an
extensionDependenciesentry in your extension'spackage.json:
// package.json
{
"extensionDependencies": ["ms-python.vscode-python-envs"]
}
- Install the npm package:
npm install @vscode/python-environments
- 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