DevFlow logoDevFlow
Python requirements.txtPEP 621 pyproject.toml (uv / Poetry)Automated Breaking Change Check

Migrate requirements.txt to pyproject.toml (PEP 621)

Convert legacy Python requirements.txt files into modern PEP 621 compliant pyproject.toml dependencies for uv, Poetry, and Flit.

From: Python requirements.txt
To: PEP 621 pyproject.toml (uv / Poetry)
Source (Python requirements.txt)
144 chars
Migrated Target (PEP 621 pyproject.toml (uv / Poetry))
1ms209 chars
// Migrated configuration for requirements-txt-to-pyproject-toml
fastapi>=0.110.0
pydantic>=2.6.0
uvicorn[standard]>=0.28.0
sqlalchemy>=2.0.0
httpx==0.27.0
# Development dependencies
pytest>=8.0.0
ruff>=0.3.0

Detected Breaking Changes & Semantic Shifts (1)

Automated Migration Check
info

Targeting automated migration for requirements-txt-to-pyproject-toml. Review exported syntax for project-specific configurations.

Resolution: Inspect generated config and run test suite to verify equivalence.

How to Migrate from Python requirements.txt to PEP 621 pyproject.toml (uv / Poetry)

  1. 1

    Paste your requirements.txt file.

  2. 2

    The migrator categorizes production and development dependencies.

  3. 3

    Generate a standardized `[project.dependencies]` block.

  4. 4

    Save as `pyproject.toml` and manage dependencies with `uv pip install` or `poetry install`.

Fast Python CI with uv

.github/workflows/python-ci.yml
name: Python CI
on: [push]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: astral-sh/setup-uv@v2
      - run: uv run pytest

Run Migration via Terminal CLI

Perform identical migration routines across entire directories or repositories in your local terminal:

devflow migrate reqs-to-pyproject -i requirements.txt -o pyproject.toml

Frequently Asked Questions

What is PEP 621?
PEP 621 is the official Python standard specifying how project metadata and dependencies should be written in pyproject.toml.
Was this guide / tool helpful to you?