https://github.com/christopherpickering/pre-commit-hooks
Pre-commit hook to convert Poetry dependencies to pip requirements file
https://github.com/christopherpickering/pre-commit-hooks
Last synced: 3 months ago
JSON representation
Pre-commit hook to convert Poetry dependencies to pip requirements file
- Host: GitHub
- URL: https://github.com/christopherpickering/pre-commit-hooks
- Owner: christopherpickering
- License: mit
- Created: 2021-05-06T16:08:30.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2026-03-02T16:23:31.000Z (3 months ago)
- Last Synced: 2026-03-02T19:50:14.185Z (3 months ago)
- Language: Python
- Homepage:
- Size: 18.6 MB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pre-commit hooks
[](https://codecov.io/gh/christopherpickering/pre-commit-hooks)
[](https://results.pre-commit.ci/latest/github/christopherpickering/pre-commit-hooks/master)
[](https://github.com/christopherpickering/pre-commit-hooks/actions/workflows/test.yaml)


## 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:
```yaml
repos:
- repo: https://github.com/christopherpickering/pre-commit-hooks
rev: # 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= .