Skip to main content

An extremely smart and efficient download manager for various cases.

Project description

TurboDL

PyPI - Version PyPI - Downloads PyPI - Code Style PyPI - Format PyPI - Python Compatible Versions

TurboDL ia an extremely smart, fast and efficient download manager with several automations.

  • Uses HTTP/2 protocol to download files.
  • Built-in sophisticated download acceleration technique.
  • Retry failed requests efficiently.
  • Automatically detects file information before download.
  • Automatically handles redirects.
  • Supports post-download hash verification.
  • Automatically uses RAM buffer to speed up downloads and reduce disk I/O.
  • Accurately displays a beautiful progress bar.

Installation (from PyPI)

pip install -U turbodl  # Install the latest version of TurboDL

Example Usage

Inside a Python script

from turbodl import TurboDL


turbodl = TurboDL(
    max_connections='auto',
    connection_speed=80,
    show_progress_bars=True,
    custom_headers=None,
    timeout=None
)

turbodl.download(
    url='https://example.com/file.txt',
    output_path='path/to/file',
    expected_hash='0a1b2c3d4e5f6g7h8i9j',  # Or None if you don't want to check the hash
    hash_type='md5'
    pre_allocate_space=False,
    use_ram_buffer=True,
)
# >>> file.txt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 35.6/35.6 kB 36.2 MB/s 0:00:00 100%

# All functions are documented and have detailed typings, use your development IDE to learn more.

From the command line

turbodl --help
# >>> ╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
# >>> │ *    url              TEXT           The download URL to download the file from. [default: None] [required]                                                                                                                  │
# >>> │      output_path      [OUTPUT_PATH]  The path to save the downloaded file to. If the path is a directory, the file name will be generated from the server response. If the path is a file, the file will be saved with the   │
# >>> │                                      provided name. If not provided, the file will be saved to the current working directory. (default: Path.cwd())                                                                          │
# >>> │                                      [default: None]                                                                                                                                                                         │
# >>> ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
# >>> ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
# >>> │ --max-connections     -mc                               INTEGER  The maximum number of connections to use for downloading the file (default: 'auto'). [default: None]                                                        │
# >>> │ --connection-speed    -cs                               FLOAT    Your connection speed in Mbps (default: 80). [default: None]                                                                                                │
# >>> │ --overwrite           -o    --no-overwrite        -no            Overwrite the file if it already exists. Otherwise, a "_1", "_2", etc. suffix will be added. [default: overwrite]                                           │
# >>> │ --show-progress-bars  -spb  --hide-progress-bars  -hpb           Show or hide all progress bars. [default: show-progress-bars]                                                                                               │
# >>> │ --timeout             -t                                INTEGER  Timeout in seconds for the download process. Or None for no timeout. [default: None]                                                                        │
# >>> │ --help                                                           Show this message and exit.                                                                                                                                 │
# >>> ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

turbodl https://example.com/file.txt [...] path/to/file  # Tip: use -cs argument to set your connection speed in Mbps and accelerate the download
# >>> file.txt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 35.6/35.6 kB 36.2 MB/s 0:00:00 100%

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, fork the repository and create a pull request. You can also simply open an issue and describe your ideas or report bugs. Don't forget to give the project a star if you like it!

  1. Fork the project;
  2. Create your feature branch ・ git checkout -b feature/{feature_name};
  3. Commit your changes ・ git commit -m "{commit_message}";
  4. Push to the branch ・ git push origin feature/{feature_name};
  5. Open a pull request, describing the changes you made and wait for a review.

Disclaimer

Please note that downloading copyrighted content from some services may be illegal in your country. This tool is designed for educational purposes only. Use at your own risk.

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

turbodl-0.1.3.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

turbodl-0.1.3-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file turbodl-0.1.3.tar.gz.

File metadata

  • Download URL: turbodl-0.1.3.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for turbodl-0.1.3.tar.gz
Algorithm Hash digest
SHA256 791851dfb09a0e4abeeed541a2be95b3cee73b20bcdfc4d2081a09e7141d0099
MD5 5af778ba95853535341db6566c88f207
BLAKE2b-256 96ca3b96300a8a3fc92435e481e38c4540acdecea031ef9777fb7f2f2acf2a3f

See more details on using hashes here.

File details

Details for the file turbodl-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: turbodl-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for turbodl-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f14961614d226b65a807b6b3d197c8e6e6288e484c4e0bad1e3dfa6fa3e766fe
MD5 905902f41aef5f38ccb246dc39824b15
BLAKE2b-256 14a019a8b97292e242e57077a4065c5cd480831e8ee364855ca73adcd8771528

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