https://github.com/ziprecruiter/poetry2uv
A useful utility to convert poetry-managed Python project to uv
https://github.com/ziprecruiter/poetry2uv
Last synced: 5 months ago
JSON representation
A useful utility to convert poetry-managed Python project to uv
- Host: GitHub
- URL: https://github.com/ziprecruiter/poetry2uv
- Owner: ZipRecruiter
- License: apache-2.0
- Created: 2025-01-13T12:56:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-01T02:21:12.000Z (over 1 year ago)
- Last Synced: 2025-04-06T14:51:20.538Z (over 1 year ago)
- Language: Python
- Size: 31.3 KB
- Stars: 3
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PoetryTwoUv
Conversion tool for converting poetry projects to uv projects.
The resulting `pyproject.toml` file will be PEP 621 compliant and a `uv.lock` file will be generated.
This uv lock file will preserve the locked versions in the poetry.lock file
## Running
```bash
poetry2uv
```
## Poetry to uv translation
### optional dependencies
Poetry
```toml
[tool.poetry.dependencies]
datadog = { version = "*", optional = true }
yappi = { version = ">=1.2.4", optional = true }
"repoze.lru" = { version = ">=0.7", optional = true }
# A list of all the optional dependencies, some of which are included in the
# below `extras`. They can be opted into by apps.
[tool.poetry.extras]
statsd = ["datadog"]
zr_context = ["repoze.lru", "python-dateutil", "pytz"]
server_timing = ["yappi"]
```
translates to uv (PEP 735)
```toml
[project.optional-dependencies]
statsd = ["datadog"]
zr_context = ["repoze.lru", "python-dateutil", "pytz"]
server_timing = ["yappi"]
```
### Groups
```toml
[tool.poetry.group.X.dependencies]
foo = { version = "*" }
bar = { version = "*" }
```
translates to
```toml
[dependency-groups]
X = [
"foo",
"bar",
]
```