|
1 | | - |
2 | 1 | # Python Environments API |
3 | 2 | The following guide describes the technical design of the Python Environments Extension. Its intended use is mainly for contributing extension authors. This extension is the entry point which will surface the entire environment management experience for Python in VS Code and its modularity should allow for individual tools / libraries to implement these methods for their tool making them usable in VS Code. |
4 | 3 |
|
@@ -29,7 +28,7 @@ The Python Environments extension has four main functionalities: |
29 | 28 |
|
30 | 29 | ## API Surface |
31 | 30 | - **PythonProjectApi** -> The API for interacting with Python projects. |
32 | | -- **PythonExecutionApi** |
| 31 | +- **PythonExecutionApi** -> The API for running code (experimental) |
33 | 32 | - **PythonEnvironmentApi** -> The API for interacting with Python environments, package |
34 | 33 | - **PythonEnvironmentManagerApi** |
35 | 34 | - **PythonPackageManagerApi** |
@@ -64,11 +63,11 @@ The relationship between **workspaces** and **environments** in the extension ca |
64 | 63 | | m | 1 | multiroot workspace, single environment | covered in m:n scenario | |
65 | 64 |
|
66 | 65 |
|
67 | | - `PythonEnvironment` describes a unique python environment that is identified by its `PythonEnvironmentId` a property containing the `id` of the environment and the `managerId`. A `PythonEnvironment` object can contain many attributes included in the code block below. Note `execInfo` of type `PythonEnvironmentExecutionInfo` contains information on both terminal activation for a given environment and code execution. The group attribute can be used to provide differentiation between environments from the same manager, such as named vs unnamed conda environments. |
| 66 | + `PythonEnvironment` describes a unique python environment that is identified by its `PythonEnvironmentId` a property containing the `id` of the environment and the `managerId`. The `envId` is autogenerated and immutable. A `PythonEnvironment` object can contain many attributes included in the code block below. Note `execInfo` of type `PythonEnvironmentExecutionInfo` contains information on both terminal activation for a given environment and code execution. The group attribute can be used to provide differentiation between environments from the same manager, such as named vs unnamed conda environments. |
68 | 67 |
|
69 | 68 | ``` |
70 | 69 | PythonEnvironment |
71 | | -- envId: PythonEnvironmentId; (unique identifier) |
| 70 | +- envId: PythonEnvironmentId; (unique identifier, autogenerated and immutable) |
72 | 71 | - id: string; |
73 | 72 | - managerId: string; |
74 | 73 | - name: string; |
@@ -125,7 +124,13 @@ Selectable by the Python logo icon and located by default in the sidepane, the P |
125 | 124 |
|
126 | 125 |
|
127 | 126 | ### Copilot Tooling |
128 | | -xxxx |
| 127 | +The extension contributes language model tools that enable GitHub Copilot to interact with Python environments. These tools allow Copilot to: |
| 128 | +- Query and list available Python environments |
| 129 | +- Get information about the currently selected environment |
| 130 | +- Install and manage packages in environments |
| 131 | +- Create new environments and projects |
| 132 | + |
| 133 | +This integration allows users to manage their Python environments through natural language conversations with Copilot in VS Code. |
129 | 134 |
|
130 | 135 | ### Command Palette |
131 | 136 |
|
|
0 commit comments