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
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
depex-0.1.0.tar.gz
(9.2 kB
view details)
Built Distribution
depex-0.1.0-py3-none-any.whl
(5.0 kB
view details)
File details
Details for the file depex-0.1.0.tar.gz
.
File metadata
- Download URL: depex-0.1.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d4f62ca6bc7a17c6d38071c4612d71fc40d5d7e5107aa53d4927a9fc3060634 |
|
MD5 | 5bb1d364cbea9b44880e76f221092f18 |
|
BLAKE2b-256 | 6b5c7daad70430ec7f26d69c361c144a71568fe1c7eba9e0f23e32080920a9cd |
File details
Details for the file depex-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: depex-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f55eb66d6d64f132eb1f36fd0bd8a65c8b522646d6f155105c53e8571b3fdfda |
|
MD5 | 3017fb0f746935750d5d6cbfc0e5d578 |
|
BLAKE2b-256 | 7ab3956f810eea40b1a608e711bef43c22511ac66233495780607a927dc4f2e0 |