pipenv-poetry-migrate
This is simple migration script, migrate pipenv to poetry.
:rocket: Get Started
Installation
$ pip install -U poetry pipenv-poetry-migrate
Migration
Step 1: Create pyproject.toml file
$ poetry init
Step 2: Migrate
To migrate Pipfile to pyproject.toml.
$ pipenv-poetry-migrate -f Pipfile -t pyproject.toml
When want to run dry-run mode:
$ pipenv-poetry-migrate -f Pipfile -t pyproject.toml -n
Dry-run mode is pyproject.toml file does not overwrite, results are displayed on standard output.
[!Note]
If the dependency already exists in the poetry dependency and you want to re-migrate it, please use the--re-migrateoption. However, if the dependency is removed from pipenv, the poetry dependency is not removed.$ pipenv-poetry-migrate -f Pipfile -t pyproject.toml --re-migrate
[!Note]
The default behavior is to migrate with the group notation, which has been available since Poetry 1.2.0. If you want to migrate withdev-dependenciesnotation, please use the--on-use-group-notationoption.$ pipenv-poetry-migrate -f Pipfile -t pyproject.toml --no-use-group-notation
Step 3: Generate lock file
$ poetry lock
If there is already a poetry.lock file, remove it first.
Step 4: Installing dependencies
To install the defined dependencies for your project.
$ poetry install
Example output
This is an example of a Pipfile to be migrated.
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
requests = "*"
[dev-packages]
pytest = "^5.2"
Migrate the above file to the following pyproject.toml.
[tool.poetry]
name = "migration-sample"
version = "0.1.0"
description = ""
authors = ["Yoshiyuki HINO <yhinoz@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.7"
[tool.poetry.group.dev.dependencies]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
By executing this script, pyproject.toml is rewritten as follows.
[tool.poetry]
name = "migration-sample"
version = "0.1.0"
description = ""
authors = ["Yoshiyuki HINO <yhinoz@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.7"
requests = "*"
[tool.poetry.group.dev.dependencies]
pytest = "^5.2"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
:handshake: Contributing
- Fork and clone the repository, and create the development branch.
- Run
poetry installto setup your develop environment. - Do your code.
- Run
bash scripts/test.shto check that your test passed. - Run
bash scripts/format.shandbash scripts/lint.shto check that you haven't warnings. - Open a PR on GitHub.
Test cases
Test cases are in tests/toml, update Pipfile with additional entries and expect_pyproject.toml with expected output.
:pencil: License
Release files for pipenv-poetry-migrate 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pipenv_poetry_migrate-0.8.0.tar.gz | 9.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pipenv_poetry_migrate-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.8 kB
Release files / pipenv_poetry_migrate-0.8.0.tar.gz
| Download URL | pipenv_poetry_migrate-0.8.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
997f8505841ae016b27928645cb9e4c6ce5dd6f87a11a82362be692b7cbf6aa8
|
|
BLAKE2b-256 checksum How to use checksums |
00148d73d916ddeab5591e4128e5615ce774143de945e48402c0130d8066e16a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.
Transparency logRelease files / pipenv_poetry_migrate-0.8.0-py3-none-any.whl
| Download URL | pipenv_poetry_migrate-0.8.0-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
598ff197f92abaa975004d11bf1029af66f941169853bfde4aa60fb516ada48d
|
|
BLAKE2b-256 checksum How to use checksums |
5460e4268e64021244f3da12ec87340d89ca0ad1687bc846962851866a6fae04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.
Transparency log