Skip to main content

Extract project requirements from pyproject.toml.

Project description

DepEx

Extract Python project dependencies from a pyproject.toml file.

Why?

I haven't completely dropped requirements.txt and requirements-dev.txt files yet so this helps me keep them in sync with the dependencies I have listed in the pyproject.toml file.

Usage

Just provide the path to a Python project directory or a pyproject.toml file and extract base dependencies, optional dependencies, or all dependencies from the pyproject.toml file.

# generate a file with only the base dependencies of a package
$ depex --no-opts > requirements.txt

# or generate a file with all dependencies (including optional) of a package
depex > requirements-dev.txt

Help

$ depex -h
usage: depex [-h] [--opts | --no-opts] [--version] path

Extract Python project requirements from a `pyproject.toml` file.

positional arguments:
  path               path to a project directory or pyproject.toml file

options:
  -h, --help         show this help message and exit
  --opts, --no-opts  include all dependencies
  --version          show program's version number and exit

Copyright 2023 Josh Duncan (joshbduncan.com)

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

depex-0.1.0.tar.gz (9.2 kB view hashes)

Uploaded Source

Built Distribution

depex-0.1.0-py3-none-any.whl (5.0 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