Skip to main content

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

Metadata

Release files for cleaner-project 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cleaner-project 1.0.1
File Size Uploaded Provenance Actions
cleaner-project-1.0.1.tar.gz 7.2 kB Without provenance Details for cleaner-project-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cleaner-project 1.0.1
File Interpreter ABI Platform Actions
cleaner_project-1.0.1-py3-none-any.whl Python 3 none any Details for cleaner_project-1.0.1-py3-none-any.whl

Total release size: 21.7 MB

Release files / cleaner-project-1.0.1.tar.gz

Download URL cleaner-project-1.0.1.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7169114877a73450631fd37f9721c16e1de26e2451949f4ee4d1e6a8b0fc5c3c
BLAKE2b-256 checksum
How to use checksums
511bd29dcde5b4ec7ce928b630c04f75f7f9034e9436bdd501ae3cdebaf15ae6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release files / cleaner_project-1.0.1-py3-none-any.whl

Download URL cleaner_project-1.0.1-py3-none-any.whl
Size 21.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
10ba82c908fbedecc6e5d20da35f5a5467b61f2ad286c7fe696cad9e11814036
BLAKE2b-256 checksum
How to use checksums
5a07031f48067d77a4e799fd57a725eec0703bb966a012f6ed4912b633ee6a7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Security for cleaner-project 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page