## TurboDL
![PyPI - Version](https://img.shields.io/pypi/v/turbodl?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/turbodl)
![PyPI - Downloads](https://img.shields.io/pypi/dm/turbodl?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/turbodl)
![PyPI - Code Style](https://img.shields.io/badge/code%20style-ruff-blue?style=flat&logo=ruff&logoColor=blue&color=blue&link=https://github.com/astral-sh/ruff)
![PyPI - Format](https://img.shields.io/pypi/format/turbodl?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/turbodl)
![PyPI - Python Compatible Versions](https://img.shields.io/pypi/pyversions/turbodl?style=flat&logo=python&logoColor=blue&color=blue&link=https://pypi.org/project/turbodl)
TurboDL is an extremely smart and efficient download manager for various cases.
- Built-in download acceleration.
- Uses your connection speed to download even more efficiently.
- Retries failed requests.
- Automatically detects the file type, name, extension, and size.
- Automatically handles redirects.
- Shows a fancy and precise progress bar.
<br>
#### Installation (from [PyPI](https://pypi.org/project/turbodl))
```bash
pip install -U turbodl # Install the latest version of TurboDL
```
### Example Usage
#### Inside a Python script
```python
from turbodl import TurboDL
from pathlib import Path # Optional
turbodl = TurboDL(
max_connections='auto',
connection_speed=80,
show_progress_bar=True,
custom_headers=None,
timeout=None
)
turbodl.download(
url='https://example.com/file',
output_path=Path.cwd()
)
# >>> filename.ext ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 35.6/35.6 kB 81.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
```bash
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 The 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 -sp --hide-progress -hp Show or hide the download progress bar. [default: show-progress] │
# >>> │ --timeout -t INTEGER Timeout in seconds for the download process. Or None for no timeout. [default: None] │
# >>> │ --install-completion Install completion for the current shell. │
# >>> │ --show-completion Show completion for the current shell, to copy it or customize the installation. │
# >>> │ --help Show this message and exit. │
# >>> ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
turbodl https://example.com/file [...] path/to/file
# >>> filename.ext ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 35.6/35.6 kB 81.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.
Raw data
{
"_id": null,
"home_page": "https://github.com/henrique-coder/turbodl",
"name": "turbodl",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "dl, downloader, manager, python, smart, turbodl",
"author": "henrique-coder",
"author_email": "hjyz6rqyb@mozmail.com",
"download_url": "https://files.pythonhosted.org/packages/cb/cd/55f24a21fca134e9a2d70e299664fafe16aedea6e591d4dc28690876a662/turbodl-0.0.3.tar.gz",
"platform": null,
"description": "## TurboDL\n\n![PyPI - Version](https://img.shields.io/pypi/v/turbodl?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/turbodl)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/turbodl?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/turbodl)\n![PyPI - Code Style](https://img.shields.io/badge/code%20style-ruff-blue?style=flat&logo=ruff&logoColor=blue&color=blue&link=https://github.com/astral-sh/ruff)\n![PyPI - Format](https://img.shields.io/pypi/format/turbodl?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/turbodl)\n![PyPI - Python Compatible Versions](https://img.shields.io/pypi/pyversions/turbodl?style=flat&logo=python&logoColor=blue&color=blue&link=https://pypi.org/project/turbodl)\n\nTurboDL is an extremely smart and efficient download manager for various cases.\n\n- Built-in download acceleration.\n- Uses your connection speed to download even more efficiently.\n- Retries failed requests.\n- Automatically detects the file type, name, extension, and size.\n- Automatically handles redirects.\n- Shows a fancy and precise progress bar.\n\n<br>\n\n#### Installation (from [PyPI](https://pypi.org/project/turbodl))\n\n```bash\npip install -U turbodl # Install the latest version of TurboDL\n```\n\n### Example Usage\n\n#### Inside a Python script\n\n```python\nfrom turbodl import TurboDL\nfrom pathlib import Path # Optional\n\n\nturbodl = TurboDL(\n max_connections='auto',\n connection_speed=80,\n show_progress_bar=True,\n custom_headers=None,\n timeout=None\n)\n\nturbodl.download(\n url='https://example.com/file',\n output_path=Path.cwd()\n)\n# >>> filename.ext \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 35.6/35.6 kB 81.2 MB/s 0:00:00 100%\n\n# All functions are documented and have detailed typings, use your development IDE to learn more.\n\n```\n\n#### From the command line\n\n```bash\nturbodl --help\n# >>> \u256d\u2500 Arguments \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n# >>> \u2502 * url TEXT The download URL to download the file from. [default: None] [required] \u2502\n# >>> \u2502 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 \u2502\n# >>> \u2502 file will be saved to the current working directory. (default: Path.cwd()) \u2502\n# >>> \u2502 [default: None] \u2502\n# >>> \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n# >>> \u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n# >>> \u2502 --max-connections -mc INTEGER The maximum number of connections to use for downloading the file (default: 'auto'). [default: None] \u2502\n# >>> \u2502 --connection-speed -cs FLOAT The connection speed in Mbps (default: 80). [default: None] \u2502\n# >>> \u2502 --overwrite -o --no-overwrite -no Overwrite the file if it already exists. Otherwise, a \"_1\", \"_2\", etc. suffix will be added. [default: overwrite] \u2502\n# >>> \u2502 --show-progress -sp --hide-progress -hp Show or hide the download progress bar. [default: show-progress] \u2502\n# >>> \u2502 --timeout -t INTEGER Timeout in seconds for the download process. Or None for no timeout. [default: None] \u2502\n# >>> \u2502 --install-completion Install completion for the current shell. \u2502\n# >>> \u2502 --show-completion Show completion for the current shell, to copy it or customize the installation. \u2502\n# >>> \u2502 --help Show this message and exit. \u2502\n# >>> \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\nturbodl https://example.com/file [...] path/to/file\n# >>> filename.ext \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 35.6/35.6 kB 81.2 MB/s 0:00:00 100%\n```\n\n### Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf 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!**\n\n1. Fork the project;\n2. Create your feature branch \u30fb `git checkout -b feature/{feature_name}`;\n3. Commit your changes \u30fb `git commit -m \"{commit_message}\"`;\n4. Push to the branch \u30fb `git push origin feature/{feature_name}`;\n5. Open a pull request, describing the changes you made and wait for a review.\n\n### Disclaimer\n\nPlease 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.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An extremely smart and efficient download manager for various cases.",
"version": "0.0.3",
"project_urls": {
"Documentation": "https://github.com/henrique-coder/turbodl",
"Homepage": "https://github.com/henrique-coder/turbodl",
"Repository": "https://github.com/henrique-coder/turbodl"
},
"split_keywords": [
"dl",
" downloader",
" manager",
" python",
" smart",
" turbodl"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4e4a5710d1d62a979e783bfd2afb5428baa4d6ef2965044cf780095a724f988c",
"md5": "73135ad54981f73310dfc7c095259091",
"sha256": "f6aa9e6de2d04264939ee8d6ddad55316671a07a6241e75cdb3932025895c833"
},
"downloads": -1,
"filename": "turbodl-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "73135ad54981f73310dfc7c095259091",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 9915,
"upload_time": "2024-12-20T00:03:33",
"upload_time_iso_8601": "2024-12-20T00:03:33.408710Z",
"url": "https://files.pythonhosted.org/packages/4e/4a/5710d1d62a979e783bfd2afb5428baa4d6ef2965044cf780095a724f988c/turbodl-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cbcd55f24a21fca134e9a2d70e299664fafe16aedea6e591d4dc28690876a662",
"md5": "af6732cd46eeac39c9afcd42735a37f3",
"sha256": "a10b0b7860c16ba72d8bdcc95d003917f590bdf402d60b07452863b8765c38c7"
},
"downloads": -1,
"filename": "turbodl-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "af6732cd46eeac39c9afcd42735a37f3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 9324,
"upload_time": "2024-12-20T00:03:35",
"upload_time_iso_8601": "2024-12-20T00:03:35.651675Z",
"url": "https://files.pythonhosted.org/packages/cb/cd/55f24a21fca134e9a2d70e299664fafe16aedea6e591d4dc28690876a662/turbodl-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-20 00:03:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "henrique-coder",
"github_project": "turbodl",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "httpx",
"specs": [
[
"==",
"0.28.1"
]
]
},
{
"name": "rich",
"specs": [
[
"==",
"13.9.4"
]
]
},
{
"name": "tenacity",
"specs": [
[
"==",
"9.0.0"
]
]
},
{
"name": "typer",
"specs": [
[
"==",
"0.15.1"
]
]
}
],
"lcname": "turbodl"
}