parfive

An asyncio based parallel file downloader for Python 3.8+

MIT License

Stars
51

Bot releases are hidden (Show)

parfive - v2.0.0

Published by Cadair over 2 years ago

This new major version of parfive tackles the usability of the API.

The API of parfive grew organically as support for more use cases were added.
To enable both a highly flexible downloader that can be used for any HTTP/FTP downloads while maintaining an accessible and simple API with the 2.0 release there is now a parfive.SessionConfig object where advanced settings are located.

The other major change in this release is that any files where the download failed before it is completed will be removed from disk. This means that you shouldn't end up with incomplete and corrupt files on disk if the download is interrupted for any reason.

Breaking Changes

  • The file_progress, notebook, use_aiofiles, and header keyword arguments to parfive.Downloader have been removed and moved into the parfive.SessionConfig object.
  • The timeouts keyword argument has been removed from the run_download() and download() methods and replaced by an option in SessionConfig.

Enhancements

  • Improve repr of Results, remove files from disk if download errors before completing and add max_splits as a keyword argument to Downloader by @nabobalis in https://github.com/Cadair/parfive/pull/76
  • Add a new SessionConfig object to allow advanced configuration of the Downloader by @Cadair in https://github.com/Cadair/parfive/pull/92
    • A new PARFIVE_HIDE_PROGRESS environment variable will disable all progress bars.
    • All environment variables are now evaluated at the time the Downloader class is instantiated (by the new config classes).
    • It is now possible to customise the instantiation of the aiohttp.ClientSession by passing a function to the aiohttp_session_generator= keyword argument to SessionConfig.
    • It is now possible to configure debug or other levels of logging with SessionConifg where previously it could only be configured with an environment variable.
    • It is now possible to configure the HTTP chunksize with SessionConfig and the default when not using aiofiles has been increased from 100 bytes to 1024 bytes.
    • It is now possible to configure the HTTP(S) proxy URLs with SessionConfig as well as the HTTP[S]_PROXY environment variables.
    • It is now possible to customise all the timeouts supported by aiohttp by passing an aiohttp.ClientTimeout object to SessionConfig.
  • Improve the CLI with more options by @Cadair in https://github.com/Cadair/parfive/pull/103
  • Cleanup after Keyboard interrupt correctly by @Cadair in https://github.com/Cadair/parfive/pull/104
    • This means that the download will be killed correctly when the download is interrupted.
    • Note that is does not work on Windows due to the lack of support for signal handling in asyncio on Windows.
  • Remove deprecated loop keyword argument by @Cadair in https://github.com/Cadair/parfive/pull/88
  • Use tqdm's auto notebook detection by @Cadair in https://github.com/Cadair/parfive/pull/90

Bug Fixes

Misc/Internal Changes

New Contributors

Full Changelog: https://github.com/Cadair/parfive/compare/v1.5.1...v2.0.0

parfive - v2.0.0rc1

Published by Cadair over 2 years ago

parfive - v1.1.1

Published by Cadair over 3 years ago

Bugfixes

  • Fix pypi metadata and some packaging improvements. (#48)
  • Update aioftp to the latest version because of an API change. (#48
parfive - v1.2.0

Published by Cadair over 3 years ago

Features

  • Make parfive.Downloader.run_download public API and move all of the parfive.Downloader.download logic into run_download. This enabled using parfive from inside an async context. (#54)

Bugfixes

  • Handing a custom loop to Downloader now does nothing, and parfive spins up its own loop. This is to prepare for python 3.10 where support for passing custom loops to various asyncio methods will be removed. (#53)
  • Fix a bug where downloads fail if max_conn is changed after construction of the parfive.Downloader instance. (#56)

Misc

parfive - v1.1.0

Published by Cadair over 4 years ago

Parfive v1.1.0 (2020-05-01)

Features

  • Add concurent requests to parfive.
    This feature splits the download of a single file into multiple parts if the server the file is being downloaded from supports ranged requests. This should improve the performance of all downloads under these circumstances, and also make parfive useful even if downloading a single file. No changes are needed to use this feature, files will be downloaded using 12 concurrent requests by default. To change the number of concurrent requests you can pass max_splits to parfive.Downloader.enqueue_file. (#15)
  • Added CLI interface to Parfive.
    (#16)
  • Parfive now only supports Python 3.6+.
    (#22)
  • Support for specifying headers to be used for all requests to parfive.Downloader has been added.
    (#32)
  • Support for HTTP_PROXY and HTTPS_PROXY environment variables have been added. (#32)

Bugfixes

  • Fix a bug where running parfive in the notebook would error if
    ipywidgets was not installed.
    (#25)
  • Remove use of the deprecated loop= keyword argument to aiohttp.ClientSession.
    (#30)
  • Update the notebook detection function due to changes in tqdm
    (#36)
  • Reduce the number of parallel connections to 25 (5 parallel files, 5
    parallel downloads per file).
    (#37)
parfive - v1.0.1

Published by Cadair over 4 years ago

Fixes a bug with detection of Jupyter notebooks and display of tqdm notebook progress bars.

parfive - v1.0.0

Published by Cadair over 5 years ago

parfive - v0.2.1

Published by Cadair over 5 years ago

parfive - v0.2

Published by Cadair over 5 years ago

parfive - v0.1.1

Published by Cadair over 6 years ago