1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
.. module:: eodag.plugins.download
================
Download Plugins
================
Download plugins must inherit the following class and implement :meth:`download`:
.. autoclass:: eodag.plugins.download.base.Download
:members:
This table lists all the download plugins currently available:
.. autosummary::
:toctree: generated/
http.HTTPDownload
aws.AwsDownload
s3rest.S3RestDownload
creodias_s3.CreodiasS3Download
---------------------------
Download methods call graph
---------------------------
Here is a graph showing how download methods are called from API to plugin:
.. image:: ../_static/download_methods.png
:alt: Download methods call graph
:class: no-scaled-link
-------------
Progress bars
-------------
While downloading, progress bars are generated using :py:class:`~eodag.utils.ProgressCallback`. They are instantiated
and closed in :meth:`EOProduct.download() <eodag.api.product._product.EOProduct.download>` which means that plugins do
not need to handle this part. Using :meth:`~eodag.api.core.EODataAccessGateway.download_all`, one progress bar will be
created and closed for each product.
The same progress bar will always be used to track both individual product download and extraction.
If a custom :py:class:`~eodag.utils.ProgressCallback` is passed as argument of
:meth:`~eodag.api.core.EODataAccessGateway.download` or :meth:`~eodag.api.core.EODataAccessGateway.download_all`, it
will be used and duplicated to create bars to track `download_all`/`download`. The same bar will be used for all
products, and will not be closed by `eodag`.
.. list-table:: ProgressCallback handling
:widths: 25 25 25 25
:header-rows: 1
:stub-columns: 1
* -
- :meth:`plugin.download_all() <eodag.plugins.download.base.Download.download_all>`
- :meth:`product.download() <eodag.api.product._product.EOProduct.download>`
- Output
* - :meth:`download(product)<eodag.api.core.EODataAccessGateway.download>`
-
- Default :class:`~eodag.utils.ProgressCallback` created for product `download`/`extraction`, then closed
- .. figure:: ../_static/progress_1_none.png
* - :meth:`download(product, progress_callback=bar)<eodag.api.core.EODataAccessGateway.download>`
-
- Passed :class:`~eodag.utils.ProgressCallback` used for product `download`/`extraction`, kept open
- .. figure:: ../_static/progress_1.png
* - :meth:`download_all(products)<eodag.api.core.EODataAccessGateway.download_all>`
- Default :class:`~eodag.utils.ProgressCallback` created for products count, then closed
- Default :class:`~eodag.utils.ProgressCallback` created per product for `download`/`extraction`, then closed
- .. figure:: ../_static/progress_2_none.png
* - :meth:`download_all(products, progress_callback=bar)<eodag.api.core.EODataAccessGateway.download_all>`
- Passed :class:`~eodag.utils.ProgressCallback` used for products count, copied for
:meth:`product.download() <eodag.api.product._product.EOProduct.download>`, then closed.
- Passed :class:`~eodag.utils.ProgressCallback` used for all products `download`/`extraction`, kept open
- .. figure:: ../_static/progress_2.png
|