Skip to main content

A Python library designed for hassle-free file downloads from Google Drive. It lets you specify the destination folder for downloads and supports .zip and .rar file formats.

Project description

Webinstaller

A Python library designed for seamless file downloads from Google Drive, offering robust features to simplify the process. It allows you to specify a custom destination folder for downloads and supports popular archive formats like .zip and .rar. The library also provides convenient options to launch downloaded files and add them to the Windows startup folder, if desired. With built-in CLI support, it ensures ease of use from the command line. Additionally, the library is resilient against connection interruptions, automatically resuming downloads once the connection is restored.

Contents

Installation

  1. Upload some random file to google drive right click it Share->Share->Set general access to anyone with the link
  2. Install library with this commands or with pip
git clone https://github.com/Sal0ID/webinstaller
cd webinstaller
pip install build
py -m build
pip install dist/webinstaller-0.0.4-py3-none-any.whl

Simplest use

Create venv or just create python file

from webinstaller import webinstaller

drive_url = "insert_link_from_google_drive_here"

webinstaller.download_file_from_google_drive(drive_url)
  1. Congratulations, you can launch your program!

Advanced usage

Specify destination

You can specify the destination folder for downloaded files. If the file is in .zip or .rar format, it will be automatically exported to the destination folder that you provided. You can use relative or absolute path. If destination folder doesn`t exist it will create it.

from webinstaller import webinstaller

drive_url = "insert_link_from_google_drive_here"
destination = "amogus" 

webinstaller.download_file_from_google_drive(drive_url, destination = destination) #Will create amogus folder and download file there

CLI usage

  1. Create .py file with following content:
from webinstaller import webinstaller

webinstaller.parse_command_line_args()
  1. Create executable file via pyinstaller
pyinstaller --noconfirm --onefile --windowed  "path_to_your_py_file"
  1. You are ready to go, now you can pass following arguments to .exe file:
    • URL to the google drive file (mandatory positional argument)
    • --destination (-d) Destination where to save downloaded file/archive (optional)
    • --launch (-l) Specify the file name for the file that you want to launch after your program is downloaded (optional) ; relative path from destination folder
    • --startup (-s) Specify file name to which shortcut will be created in windows startup directory (optional).

Example:

main.exe https://google.com -d folder -l main.exe -s onstartup.exe

Launch file after download

from webinstaller import webinstaller

drive_url = "insert_link_from_google_drive_here"

webinstaller.download_file_from_google_drive(drive_url, launch_file_after_download = "deleteme.exe") # File deleteme.exe will be lauched after download if it exists. Also you can pass other arguments

Add shortcut to startup folder

Program will create shortcut in C:\Users\User_Name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup pointing to file that you specify. You can pass other arguments

from webinstaller import webinstaller

drive_url = "insert_link_from_google_drive_here"

webinstaller.download_file_from_google_drive(drive_url, add_shortcut_to_startup_folder = "deleteme.exe") # 

Project details


Download files

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

Source Distribution

webinstaller-0.0.4.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webinstaller-0.0.4-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file webinstaller-0.0.4.tar.gz.

File metadata

  • Download URL: webinstaller-0.0.4.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for webinstaller-0.0.4.tar.gz
Algorithm Hash digest
SHA256 76c2ac1b7d7ea5cb4ac1f096bfb3df3e13f94fff0121f7fd887663d6fc1fe30c
MD5 a87449d1c0587ade692f8859c7b68d68
BLAKE2b-256 ec7d10b659c069029e467c5cadb3be5c92ba4cd0895fec4388dca54289222304

See more details on using hashes here.

File details

Details for the file webinstaller-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: webinstaller-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for webinstaller-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 17b41160b030d43b39a5fecdd0b5a2ccea4c2a492b54962d2a5a1265f8a8e65b
MD5 1d97ecc3338d7130de758cbf270b4a49
BLAKE2b-256 d8f57d88b93576a283475308bfa4c42a53b0210e2a4797b050213359eeb4adfd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page