Skip to main content

rr-delete-unused-packages

This library is designed to reduce the size of your Python virtual environment based on the actual usage of libraries in your project. The primary objective is to eliminate any unused libraries to optimize resource utilization effectively. The process is straightforward and user-friendly. However, it's crucial to refrain from working within the tested environment until the process is complete. At the conclusion of the process, you'll have the flexibility to decide whether to retain the newly created environment or revert to the previous one, depending on your specific requirements.

Environment and Installations

  • Ensure that you have Python version 3.10 or higher installed.
  • Navigate to the relevant project where you want to test the virtual environment.
  • Ensure that a requirements.txt file is present in the project's root path.
  • Install the rr-delete-unused-packages package from PyPI using the following command:
pip install rr-delete-unused-packages

Test your virtual environment

Run this script from the project's root path:

import os
from rr_process.delete_unused_libs import UnusedDependencies

if __name__ == '__main__':
    project_main_fp, venv_fp = os.getcwd(), f"<project_env_file_path>"  
    UnusedDependencies(main_path=project_main_fp, venv_path=venv_fp).run()

The second option is start a new session by terminal command:

python3 ./<script_env_file_path>/delete_unused_libs.py ./ ./<project_env_file_path>

Please make sure to replace <project_env_file_path> & <script_env_file_path> with the actual path to your project's environment path.

Metadata

Release files for rr-delete-unused-packages 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 rr-delete-unused-packages 0.1
File Size Uploaded Provenance Actions
rr-delete-unused-packages-0.1.tar.gz 3.9 kB Without provenance Details for rr-delete-unused-packages-0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rr-delete-unused-packages 0.1
File Interpreter ABI Platform Actions
rr_delete_unused_packages-0.1-py3-none-any.whl Python 3 none any Details for rr_delete_unused_packages-0.1-py3-none-any.whl

Total release size: 8.3 kB

Release files / rr-delete-unused-packages-0.1.tar.gz

Download URL rr-delete-unused-packages-0.1.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
02edb751a1305a53b85d5ced453b0dd7f0ec12275176f2c33a5449d9f90caf48
BLAKE2b-256 checksum
How to use checksums
7d063e39501f1cb6fe7f9c62c38fcc10328083f667dc5a18c8a37fef0f5c0585
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.2 pkginfo/1.6.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Release files / rr_delete_unused_packages-0.1-py3-none-any.whl

Download URL rr_delete_unused_packages-0.1-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b8ee474a1a808ef7252a74f2dad21c78c23ec55f786a360fbecc8620d49736e
BLAKE2b-256 checksum
How to use checksums
935436495546178220b32538928d89882aa2b32f0b812e4cfb2968303186cbac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.2 pkginfo/1.6.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Security for rr-delete-unused-packages 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

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