Simple script to convert a pyproject.toml file to a requirements.txt file.
Does not support poetry projects! They have their own converter tools.
Install with pip:
pip install toml-to-requirements
Run the following command to generate a requirements.txt file without including optional dependencies:
toml-to-req --toml-file pyproject.toml
To include optional dependencies, include the --optional-lists
flag in the above command:
toml-to-req --toml-file pyproject.toml --optional-lists dev,test
To convert a poetry project, run the following command:
toml-to-req --toml-file pyproject.toml --poetry
MIT