Extractor for python dependencies form pyproject.toml file and create requirements.txt file to be used in docker image builds
Project description
pydep_extractor
How to Use pydep_extractor
This script extracts the dependencies from the pyproject.toml
file and writes them to a requirements.txt
file.
The requirements.txt
file is used by the Dockerfile to install the dependencies before installing the application. This is done to speed up the build process and improve caching.
Installation
pip install pydep_extractor
Usage
-
To process a specific
pyproject.toml
file and create arequirements.txt
file:python -m pydep_extractor path/to/pyproject.toml
-
To install the dependency without creating a
requirements.txt
file:python -m pydep_extractor path/to/pyproject.toml --install
-
To set a non-default pip command:
python -m pydep_extractor path/to/pyproject.toml --pip-command pip3
-
To ignore specific requirements:
python -m pydep_extractor path/to/pyproject.toml --ignore string1 string2
-
To specify a different output file for the dependencies:
python -m pydep_extractor path/to/pyproject.toml --output path/to/requirements.txt
-
To specify a different output file for the pyproject if using the ignore dependency options:
python -m pydep_extractor path/to/pyproject.toml --pyproject-output path/to/pyproject_filtered.toml
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pydep_extractor-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc5a5c25625cdc2debd9d65f47d0e364c727594fca315d48c60d1f5346b9728d |
|
MD5 | 876e8d58dc670b08eca2d8263e994915 |
|
BLAKE2b-256 | 164fee4c851845f83104ba1d3fad5a4f680c0a1cb254e4c97aca41cb8cc77151 |