Skip to content

Commit 77b5fa3

Browse files
Copilotjoshspicer
andcommitted
Update README with missing Pixi support, fix typo, add build instructions
Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
1 parent 99cbd29 commit 77b5fa3

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

README.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Performant Python environment tooling and support, such as locating all global Python installs and virtual environments.
44

5-
This project will be consumed by the [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) directly. You can find the code to consume `pet` in the Python extension [source code](https://github.com/microsoft/vscode-python/blob/main/src/client/pythonEnvironments/base/locators/common/nativePythonFinder.ts). For more information on JSNORPC requests/notifications for this tool, please reference [/docs/JSONRPC.md](https://github.com/microsoft/python-environment-tools/blob/main/docs/JSONRPC.md).
5+
This project will be consumed by the [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) directly. You can find the code to consume `pet` in the Python extension [source code](https://github.com/microsoft/vscode-python/blob/main/src/client/pythonEnvironments/base/locators/common/nativePythonFinder.ts). For more information on JSONRPC requests/notifications for this tool, please reference [/docs/JSONRPC.md](https://github.com/microsoft/python-environment-tools/blob/main/docs/JSONRPC.md).
66

77
## Environment Types Supported
88

@@ -15,6 +15,8 @@ This project will be consumed by the [Python extension](https://marketplace.visu
1515
- Miniconda
1616
- Miniforge
1717
- PipEnv
18+
- Pixi
19+
- Poetry
1820
- Homebrew
1921
- VirtualEnvWrapper
2022
- VirtualEnvWrapper-Win
@@ -26,11 +28,52 @@ This project will be consumed by the [Python extension](https://marketplace.visu
2628

2729
- Discovery of all global Python installs
2830
- Discovery of all Python virtual environments
31+
- Fast performance using Rust with minimal I/O operations
32+
- JSONRPC server interface for IDE integration
33+
- Support for 15+ Python environment types across Windows, macOS, and Linux
34+
35+
## Build and Usage
36+
37+
### Building from Source
38+
39+
```bash
40+
# Clone the repository
41+
git clone https://github.com/microsoft/python-environment-tools.git
42+
cd python-environment-tools
43+
44+
# Build the project
45+
cargo build --release
46+
47+
# Run tests
48+
cargo test --all
49+
```
50+
51+
### Usage
52+
53+
```bash
54+
# Start as a JSONRPC server (for IDE integration)
55+
./target/release/pet server
56+
57+
# Find all Python environments (CLI mode)
58+
./target/release/pet find
59+
60+
# Resolve details for a specific Python executable
61+
./target/release/pet resolve /path/to/python
62+
```
63+
64+
For detailed JSONRPC API documentation, see [/docs/JSONRPC.md](./docs/JSONRPC.md).
2965

3066
## Key Methodology
3167

3268
Our approach prioritizes performance and efficiency by leveraging Rust. We minimize I/O operations by collecting all necessary environment information at once, which reduces repeated I/O and the need to spawn additional processes, significantly enhancing overall performance.
3369

70+
### Performance Principles
71+
72+
- **Avoid spawning processes**: Extract information from files and filesystem when possible
73+
- **Report immediately**: Use asynchronous discovery pattern to report environments as soon as they are found
74+
- **Complete information**: Gather all environment details in one pass, avoiding incremental reporting
75+
- **Minimal I/O**: Reduce filesystem operations through efficient batching and caching
76+
3477
## Contributing
3578

3679
This project welcomes contributions and suggestions. Most contributions require you to agree to a

0 commit comments

Comments
 (0)