Determine what 3rd-party packages a project imports.
Project description
packagelister
Determine what packages and versions a project imports.
Install with:
pip install packagelister
Only has one function:
packagelister.scan()
It takes one optional argument and that is the directory or file to scan.
If an argument isn't given, the current working directory will be scanned.
Usage:
>>> from pathlib import Path >>> import packagelister >>> import json >>> packages = packagelister.scan() [___________________________________________________]-100.00% Scanning packagelister.py >>> print(json.dumps(packages, indent=2)) { "pathcrawler": { "files": [ "src/packagelister/packagelister.py" ], "version": "0.1.0" }, "printbuddies": { "files": [ "src/packagelister/packagelister.py" ], "version": "0.4.1" } }Can also be used as a cli tool:
>packagelister packagelister -sf [___________________________________________________]-100.00% Scanning packagelister_cli.py Packages used in packagelister: pathcrawler==0.0.3 src\packagelister\packagelister.py printbuddies==0.2.2 src\packagelister\packagelister.pyCli help:
>packagelister -h usage: packagelister_cli.py [-h] [-sf] [-gr] [-ib] [project_path]positional arguments: project_path The project directory path to scan.
options: -h, --help show this help message and exit -sf, --show_files Show which files imported each of the packages. -gr, --generate_requirements Generate a requirements.txt file in --project_path. -ib, --include-builtins Include built in standard library modules.
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
packagelister-1.3.0.tar.gz
(64.6 kB
view hashes)
Built Distribution
Close
Hashes for packagelister-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8cb4300bfbf2e52ad1f7fe5f5df7faf96f7b0fde7b16de3e8a0242fa9757759 |
|
MD5 | f6b057863f38c0534ba9f93aabf21a5e |
|
BLAKE2b-256 | f4ea1858c7c8b9bbb8a1ec3375fde6ee8ccd88d810d1dd679a96089b0b8f4f85 |