Partitions the project w.r.t. its core files to libraries and scripts (that is, those files that do not directly relate to the project core files). The latter can be removed with a dedicated API call and its options.
Project description
PyCleaner
PyCleaner is a simple Python library that helps you to keep the repository clean by finding all redundant py-files there. It is especially helpful when you incorporate someone else's repositories, your project is growing huge, and at some point, you need to get rid of the Python scripts you don't use.
PyCleaner scans the project folder for dependencies of the core project files (target). After exploring the project directory, it provides stats about modules directly or indirectly imported in the target files. These modules are referred to (in the context of this package) as libraries. The rest files whose names were not found during recursive search of the import statements of the core files are named scripts. While the removal of scripts is possible by design, a user should prefer manual deletion after more thorough inspection.
Usage
Install with pip
pip install pycleaner
Get stats about the core file dependencies
pycleaner --project <proj_dir> --target <dir_w/_project_core_files>
Remove those files on which the core file do not depend
pycleaner --project <proj_dir> --target <dir_w/_project_core_files> --rm-scripts
Learn more about pycleaner
's options
pycleaner --help
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
Built Distribution
Hashes for cleaner_project-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10ba82c908fbedecc6e5d20da35f5a5467b61f2ad286c7fe696cad9e11814036 |
|
MD5 | 980720425587dc064a8209b6f1357531 |
|
BLAKE2b-256 | 5a07031f48067d77a4e799fd57a725eec0703bb966a012f6ed4912b633ee6a7c |