uvenv - workflow tool for uv.
Note: This project is a work in progress. Some features may not be fully implemented or may change in the future.
uvenv assumes the following project structure:
requirements.in— A file containing the packages to be installed.requirements.txt— A lockfile containing the exact versions of the packages to be installed.
uvenv is a Python project management tool that leverages the speed of uv for dependency management and virtual environment creation. It provides a simple interface for managing Python projects, inspired by tools like pipenv, but using requirements.txt and requirements.in files.
Philosophy
- Simplicity:
uvenvaims to provide a simple and intuitive interface for managing Python projects. - Speed:
uvenvleverages the speed of uv for dependency management and virtual environment creation. - Flexibility:
uvenvaims to be flexible and support a variety of project structures and workflows. - Compatibility:
uvenvaims to be compatible with a variety of Python versions and platforms. - Minimalism:
uvenvaims to be minimal and avoid unnecessary complexity. - Power:
uvenvaims to provide powerful features for managing Python projects. - Community:
uvenvaims to be community-driven and open-source.
Features
- Automatic project root discovery
- Virtual environment management
- Dependency installation and uninstallation
- Requirements locking
- Command running within the virtual environment
- Interactive shell with activated virtual environment
Installation
To install uvenv, you need to have Python 3.6+ and uv installed. Then you can install uvenv using pip:
$ pip install uvenv
Usage
uvenv provides the following commands:
Install
Install dependencies or specific packages:
$ uvenv install
$ uvenv install <package1> <package2>
Uninstall
Remove specific packages:
$ uvenv uninstall <package1> <package2>
Lock
Generate or update requirements.txt:
$ uvenv lock
Help
Show help message:
$ uvenv --help
Project Structure
uvenv expects your project to have either a requirements.txt or requirements.in file in the project root. It will automatically discover the project root by searching for these files in the current directory and its parents.
Usage
-
Start a new project:
$ mkdir myproject $ cd myproject $ echo "requests==2.26.0" > requirements.in $ uvenv install -
Add a new package:
$ uvenv install numpy -
Remove a package:
$ uvenv uninstall requests -
Update locked requirements:
$ uvenv lock
Upcoming features
-
Run a Python script:
$ uvenv run python myscript.py -
Start an interactive shell:
$ uvenv shell
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project will be licensed under the MIT License.