Metadata-Version: 2.1
Name: dload
Version: 0.1
Summary: A multipurpose downloader for python >= 3.6
Home-page: https://github.com/x011/dload
Author: xTudo
Author-email: dload@11.to
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.6
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: requests (>=2.22.0)

# dload - Download Library

A python library to simplify your download tasks.


### Requirements:
+ python >= 3.6 

### Dependencies:
+ requests>=2.22.0

Install `dload` on your system : 

```
pip install dload
```

Load `dload` it into your code : 

```
import dload
```

## Usage Examples:

#### Download and save a remote file:
```
dload.save('https://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/Albert_Einstein_Head.jpg/800px-Albert_Einstein_Head.jpg', '~/einstein.jpg')  
```

#### Download and save an FTP file:
```
dload.ftp('ftp://speedtest.tele2.net/5MB.zip', '~/5MB.zip')  

```

#### Returns the remote file as a byte obj:
```
dload.bytes('https://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/Albert_Einstein_Head.jpg/800px-Albert_Einstein_Head.jpg')
```


#### Returns the remote file as a dict:
```
dload.json("https://support.oneskyapp.com/hc/en-us/article_attachments/202761627/example_1.json" )
```

#### Returns the request reply headers as a dict:
```
dload.headers("https://support.oneskyapp.com/hc/en-us/article_attachments/202761627/example_1.json" )
```

#### Returns the remote file as a string:

```
dload.text("https://www.w3.org/TR/PNG/iso_8859-1.txt" )
```

#### Multi threaded downloader from a python list

```
file_list = ["https://ftp.mozilla.org/pub/firefox/releases/0.8/contrib/firefox-0.8-i386-pc-solaris2.8.tar.gz",
             "https://ftp.mozilla.org/pub/firefox/releases/0.8/contrib/firefox-0.8-i386-unknown-netbsdelf1.6.tar.bz2",
             "https://ftp.mozilla.org/pub/firefox/releases/1.0.6/linux-i686/da-DK/firefox-1.0.6.tar.gz",
             "https://ftp.mozilla.org/pub/firefox/releases/1.0.6/linux-i686/da-DK/firefox-1.0.6.installer.tar.gz",
             "https://ftp.mozilla.org/pub/firefox/releases/0.8/contrib/firefox-0.8-i686-pc-linux-gnu-ctl-svg.tar.gz",
             "https://ftp.mozilla.org/pub/firefox/releases/0.8/contrib/firefox-0.8-sparc-sun-solaris2.8-gtk2.tar.gz",
             "https://ftp.mozilla.org/pub/firefox/releases/0.8/contrib/firefox-os2-0.8.zip",
             "https://ftp.mozilla.org/pub/firefox/releases/0.8/FirefoxSetup-0.8.exe",
             "https://ftp.mozilla.org/pub/firefox/releases/0.8/Firefox-0.8.zip",
             "https://ftp.mozilla.org/pub/firefox/releases/0.8/firefox-source-0.8.tar.bz2",
             "https://ftp.mozilla.org/pub/firefox/releases/1.0.6/win32/cs-CZ/Firefox%20Setup%201.0.6.exe"]`

save_multi(file_list, "d:/test_dowmload/", max_threads=10)
```


#### Multi threaded downloader from a text file

```
file_list = "C:/Users/0x/Desktop/python_3/dload/examples/file_list.txt"
save_multi(file_list, "d:/test_dowmload_text/", max_threads=10)
```


#### Download Speed Test

```
dload.speed_test()
dload.speed_test(10)
dload.speed_test(50, "ipv6")
dload.speed_test(1024, port=8080)

[==============================] 61.34037 Mbps
100MB = 17.10 seconds
```

#### Save and Extract a remote zip

```
dload.save_unzip("https://file-examples.com/wp-content/uploads/2017/02/zip_2MB.zip")
```

