pip-download icon indicating copy to clipboard operation
pip-download copied to clipboard

using pip-download as library

Open saklar13 opened this issue 4 years ago • 1 comments

Thanks for the useful tool :)

I want to use this package as a library in my scripts. Please add the pip-download function that I can import and use. Something like this:

from pipdownload import pipdownload
pipdownload(
    requirement_file='folder/requirements.txt',
    python_versions=['cp37'],
    platform_tags=['win32'],
    dest_dir='folder_for_download',
)

saklar13 avatar Jul 21 '20 14:07 saklar13

Maybe you can use subprocess instead ?

import subprocess
subprocess.run(["pipdownload", "-py", "cp37", "-pt", "win32", "-d", "folder_for_download"])

youngquan avatar Aug 07 '20 03:08 youngquan