Skip to main content

Convert requirements.txt to pyproject.toml

Project description

Req2Toml

Adding the dependencies from requirements.txt to pyproject.toml and poetry.lock with one command 😉

Install

$ pip install req2toml

Usages

The entrypoint of the converter is req2lock

Options

  • -f [required] The path to the requirements.txt
  • --install [optional] By default, it will only update the lock, add this flag to install the dependencies at the same time.
  • --dev [optional] By default, the flag is disable, pass --dev to add packages to dev section.
  • -v: Enable verbose mode to print out the debug logs
# Only update the poetry.lock
$ req2lock -f requirements.txt

# Install
$ req2lock -f requirements.txt --install

# To dev
$ req2lock -f requirements_test.txt --install --dev

Contributing

PR is always welcome <3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

req2toml-1.2.0.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

req2toml-1.2.0-py3-none-any.whl (10.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page