Skip to main content

rr-delete-unused-packages

Project description

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.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rr-delete-unused-packages-0.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

rr_delete_unused_packages-0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file rr-delete-unused-packages-0.1.tar.gz.

File metadata

  • Download URL: rr-delete-unused-packages-0.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for rr-delete-unused-packages-0.1.tar.gz
Algorithm Hash digest
SHA256 02edb751a1305a53b85d5ced453b0dd7f0ec12275176f2c33a5449d9f90caf48
MD5 5e2360cc9e2ee050f24168d8d9adb7ab
BLAKE2b-256 7d063e39501f1cb6fe7f9c62c38fcc10328083f667dc5a18c8a37fef0f5c0585

See more details on using hashes here.

File details

Details for the file rr_delete_unused_packages-0.1-py3-none-any.whl.

File metadata

  • Download URL: rr_delete_unused_packages-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for rr_delete_unused_packages-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b8ee474a1a808ef7252a74f2dad21c78c23ec55f786a360fbecc8620d49736e
MD5 744a2945afbf3ee39e1a08acb891c320
BLAKE2b-256 935436495546178220b32538928d89882aa2b32f0b812e4cfb2968303186cbac

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