Skip to content

Latest commit

 

History

History
73 lines (54 loc) · 1.83 KB

File metadata and controls

73 lines (54 loc) · 1.83 KB

hatch-uvenv

This provides a plugin for Hatch that creates environments using UV's locked virtual environment capabilities for fast, reproducible Python dependency management.

Hatch project Lint PyPI version PyPI Supported Python Versions Downloads

Table of Contents

Installation

  • pyproject.toml

    [tool.hatch.env]
    require = ["hatch-uvenv"]
  • hatch.toml

    [env]
    require = ["hatch-uvenv"]

Configuration

The environment plugin name is uvenv.

  • pyproject.toml

    [tool.hatch.envs.<env_name>]
    type = "uvenv"
  • hatch.toml

    [envs.<env_name>]
    type = "uvenv"

Dependencies

UV's locked environments ensure that dependencies are installed in a fast and deterministic manner. The environment will resolve dependencies based on a lockfile, ensuring reproducibility.

Example config:

[envs.<ENV_NAME>]
uv-flags = [
  "--all-packages",
]
groups = [
  "dependency-group-1",
  "dependency-group-2",
]
features = [
  "feature-1",
  "feature-2",
]