Skip to content

Commit 01477d6

Browse files
committed
update readme
1 parent e34388e commit 01477d6

File tree

1 file changed

+69
-1
lines changed

1 file changed

+69
-1
lines changed

README.md

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,69 @@
1-
# Hatch UV venv
1+
# hatch-uvenv
2+
3+
This provides a plugin for [Hatch](https://github.com/pypa/hatch) that creates
4+
[environments](https://hatch.pypa.io/latest/environment/) using UV's locked virtual environment
5+
capabilities for fast, reproducible Python dependency management.
6+
7+
[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)
8+
9+
**Table of Contents**
10+
11+
- [Installation](#installation)
12+
- [Configuration](#configuration)
13+
- [Dependencies](#dependencies)
14+
15+
## Installation
16+
17+
- ***pyproject.toml***
18+
19+
```toml
20+
[tool.hatch.env]
21+
require = ["hatch-uvenv"]
22+
```
23+
24+
- ***hatch.toml***
25+
26+
```toml
27+
[env]
28+
require = ["hatch-uvenv"]
29+
```
30+
31+
## Configuration
32+
33+
The [environment plugin](https://hatch.pypa.io/latest/plugins/environment/) name is `uvenv`.
34+
35+
- ***pyproject.toml***
36+
37+
```toml
38+
[tool.hatch.envs.<env_name>]
39+
type = "uvenv"
40+
```
41+
42+
- ***hatch.toml***
43+
44+
```toml
45+
[envs.<env_name>]
46+
type = "uvenv"
47+
```
48+
49+
### Dependencies
50+
51+
UV's locked environments ensure that dependencies are installed in a fast and deterministic manner.
52+
The environment will resolve dependencies based on a lockfile, ensuring reproducibility.
53+
54+
Example config:
55+
56+
```toml
57+
[envs.<ENV_NAME>]
58+
uv-flags = [
59+
"--all-packages",
60+
]
61+
groups = [
62+
"dependency-group-1",
63+
"dependency-group-2",
64+
]
65+
features = [
66+
"feature-1",
67+
"feature-2",
68+
]
69+
```

0 commit comments

Comments
 (0)