Skip to main content

Pre-commit hook to convert Poetry dependancies to pip requirements.txt.

Project description

Pre-commit hooks

Poetry to Pip requirements

This pre-commit hook can be used to generate a (requirements)[https://pip.pypa.io/en/stable/user_guide/#requirements-files] file for pip from Poetry's dependency list.

General Usage

In each of your repos, add a file called .pre-commit-config.yaml with the following contents:

repos:
  - repo: https://github.com/christopherpickering/pre-commit-hooks
    rev: <VERSION> # Get the latest from: https://github.com/christopherpickering/pre-commit-hooks/releases
    hooks:
      - id: poetry-to-requirements
        args: [--dev,--output=subfolder/requirements.txt]

Arguments

  • --dev: include dev requirements. Default= False
  • --output=folder/requirements.txt: output file name. Default= requirements.txt. This path should be relative to the --input path.
  • (optional) --input=path/to/project_root: path to the project root. Default= .

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

poetry_to_requirements-1.0.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

poetry_to_requirements-1.0.1-py3-none-any.whl (3.9 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