Skip to main content

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 a requirements.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


Download files

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

Source Distribution

pydep_extractor-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

pydep_extractor-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file pydep_extractor-0.1.0.tar.gz.

File metadata

  • Download URL: pydep_extractor-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pydep_extractor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e5a3f5698258ddfe30b6ac744e4a42409cfa4a8ee012ba1d82c6ddeb2da5664c
MD5 a55e19ded3a5f79fd6f207e2fbf0569d
BLAKE2b-256 6d555a5b4955d85ca2cefeec669aef5b68354923f50fcafcdaa8ebde593c1d77

See more details on using hashes here.

File details

Details for the file pydep_extractor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pydep_extractor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc5a5c25625cdc2debd9d65f47d0e364c727594fca315d48c60d1f5346b9728d
MD5 876e8d58dc670b08eca2d8263e994915
BLAKE2b-256 164fee4c851845f83104ba1d3fad5a4f680c0a1cb254e4c97aca41cb8cc77151

See more details on using hashes here.

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