Skip to main content

Print dependencies and optional dependencies from pyproject.toml files.

Project description

Unit tests PyPI - Python Version Libraries.io dependency status for GitHub repo

Print or save to a file, dependencies in a pyproject.toml file based on defined match operators. This is similar to a dependency ‘freeze’ but with added configurability.

This can be useful for finding and testing with the oldest versions of the dependencies for which support is declared in pyproject.toml.

Getting Started

Install and run:

pip install dlister
dlister --help


usage: dlister [-h]
               [-i INFILE]
               [-o OUTPUT]
               [-m [{<,<=,==,>=,>,~=} ...]]
               [--skip [SKIP ...]]
               [--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
               [--log-file LOG_FILE]
               [-v]
               [dependencies ...]

Print Python Project Dependencies.

positional arguments:
dependencies          path(s) to input file(s) (default: [])

options:
-h, --help            show this help message and exit
-i INFILE, --infile INFILE
                      path(s) to input file(s) (default: pyproject.toml)
-o OUTPUT, --output OUTPUT
                      output file. (default: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)
-m [{<,<=,==,>=,>,~=} ...], --match-operators [{<,<=,==,>=,>,~=} ...]
                      operators to upgrade. (default: ['==', '>='])
--skip [SKIP ...]     dependencies to skip. (default: [])
--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                      logging level. (default: WARNING)
--log-file LOG_FILE   pipe loggining to file instead of stdout. (default: None)
-v, --version         show program's version number and exit

Usage

Run:

dlister test
packaging==22.0
tomli==2.0.0; python_version < "3.11"

dlister -m "<=" "=="
packaging==24.1
tomli==2.0.2; python_version < "3.11"

dlister test
packaging==22.0
tomli==2.0.0; python_version < "3.11"
brundle==1.1.0
isort==5.13.2
mypy==1.13.0
ruff==0.7.1
pytest==8.3.3
pytest-cov==5.0.0

dlister "*"
packaging==22.0
tomli==2.0.0; python_version < "3.11"
brundle==1.1.0
isort==5.13.2
mypy==1.13.0
ruff==0.7.1
pytest==8.3.3
pytest-cov==5.0.0
bouillon==2.6.0
build==1.2.2.post1
licensecheck==2024.3
uppd==1.3.0
twine==5.1.1

dlister test -o requirements.old

Development

Setup, run tests and release:

pip install .[dev]
brundle
pytest
bouillon release 1.2.3

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

dlister-0.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

dlister-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dlister-0.1.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for dlister-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4f96203a659de1669eb20e74ee212312c454fb9a776e6d05f47162ef6df57e7b
MD5 421f79868431c6848d0656e218e86328
BLAKE2b-256 7cdfbc731cd63c53bf5350689510e5809801f971545db1e8969db52ae6e40b08

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dlister-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for dlister-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7124e08b74f32c996743a7d2333457563c11e8c801863800950ad8257e20d49
MD5 dd02f1c1f4ea488b21a1c8150f98b37d
BLAKE2b-256 642b0ab16e28c120a609a7bd88f5fc17565acef2ff44ced83bd660c51ae5bc78

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