Python Pixi - Python Package Manager
I’ve tried several Python package managers (pip, conda, Poetry). While trying Pixi, I found its features particularly useful for production setups.
In pyproject.toml you can define dependency groups for different environments (dev, test, prod). When installing, specify the environment so only the required dependencies are installed.
This helps keep production environments clean by excluding unnecessary packages.
You can also define reusable tasks and run them with pixi run <task-name>. This is a convenient way to run common commands defined in pyproject.toml.
Installing Pixi
1 | brew install pixi # macOS |
How to use Pixi for running a task
pyproject.toml
1 | [project] |
Quick add commands:
1 | pixi task add format "black src/" |
Notes:
- Run a single task:
pixi run <task-name> - Make tasks depend on each other if needed (e.g., run format before lint)
Python Pixi - Python Package Manager