Skip to content
/ pyrange Public

the http library is for downloading a url resource by range bytes.

Notifications You must be signed in to change notification settings

fengde/pyrange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

  1. pyrange

    just support download by range now.


    example

    ​ 1)common download.

    import pyrange

    task = pyrange.Download("https://www.python.org/ftp/python/2.7.13/python-2.7.13-macosx10.6.pkg")

    task.start()

    ​ 2)download in block mode.

    import pyrange

    task = pyrange.Download("https://www.python.org/ftp/python/2.7.13/python-2.7.13-macosx10.6.pkg", thread_num=5, path="./python-2.7.13-macosx.pkg")

    task.start()

    ​ 3) download in unblock mode, also support callback.

    import pyrange

    def func(url, filepath):

    print "finished"

    task = pyrange.Download("https://www.python.org/ftp/python/2.7.13/python-2.7.13-macosx10.6.pkg", thread_num=5, path="./python-2.7.13-macosx.pkg", block=False, callback=func)

    task.start()

    task.wait()

About

the http library is for downloading a url resource by range bytes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages