Hint

You can run this notebook in a live session with Binder.

Configuration#

This section shows how to configure eodag to suit your needs.
You will learn how to:
[1]:
from eodag import EODataAccessGateway

Add or update a provider#

An EODataAccessGateway object has the methods add_provider() to quickly add a new provider, and update_providers_config() that allows to either add a new provider or to update an existing one. The example below shows how to add a STAC provider using both methods.

[2]:
dag = EODataAccessGateway()
dag.available_providers()
[2]:
['peps',
 'cop_dataspace',
 'cop_marine',
 'creodias',
 'earth_search',
 'earth_search_gcs',
 'ecmwf',
 'eumetsat_ds',
 'fedeo_ceda',
 'geodes',
 'planetary_computer',
 'sara',
 'usgs_satapi_aws']
[3]:
dag.add_provider("uvt", "https://stac.sage.uvt.ro/search")

which is equivalent to:

[4]:
dag.update_providers_config("""
    uvt2:
        search:
            type: StacSearch
            api_endpoint: https://stac.sage.uvt.ro/search
        products:
            GENERIC_PRODUCT_TYPE:
                productType: '{productType}'
        download:
            type: HTTPDownload
""")
[5]:
"uvt" in dag.available_providers(), "uvt2" in dag.available_providers()
[5]:
(True, True)

For advanced provider configuration, see Developer guide / Add a provider

Set a provider’s priority#

The method set_preferred_provider() can be used to dynamically set the preferred provider/prioritary.

And the method get_preferred_provider() will return the current preferred/prioritary provider associated to its priority.

By default, if priority is not passed as argument, add_provider() sets the added provider as the preferred one:

[6]:
dag.get_preferred_provider()
[6]:
('uvt', 2)
[7]:
dag.set_preferred_provider("uvt2")
dag.get_preferred_provider()
[7]:
('uvt2', 3)

Logging#

Logging is activated with the setup_logging() method. It’s a useful way to see what eodag does under the hood (e.g. requesting the provider, adapting the response, etc.). It’s also useful to detect when things go wrong and create an issue on GitHub if relevant.

The method accepts the following values for its verbose parameter:

  • 0: no logging and no progress bar

  • 1: no logging but progress bars displayed

  • 2: log at the INFO level

  • 3: log at the DEBUG level (even more information)

[8]:
from eodag import setup_logging
setup_logging(verbose=2)
[9]:
EODataAccessGateway()
2025-10-13 09:35:08,308 eodag.config                     [INFO    ] Loading user configuration from: /home/docs/.config/eodag/eodag.yml
2025-10-13 09:35:08,331 eodag.core                       [INFO    ] usgs: provider needing auth for search has been pruned because no credentials could be found
2025-10-13 09:35:08,331 eodag.core                       [INFO    ] aws_eos: provider needing auth for search has been pruned because no credentials could be found
2025-10-13 09:35:08,332 eodag.core                       [INFO    ] cop_ads: provider needing auth for search has been pruned because no credentials could be found
2025-10-13 09:35:08,333 eodag.core                       [INFO    ] cop_cds: provider needing auth for search has been pruned because no credentials could be found
2025-10-13 09:35:08,333 eodag.core                       [INFO    ] meteoblue: provider needing auth for search has been pruned because no credentials could be found
2025-10-13 09:35:08,334 eodag.core                       [INFO    ] hydroweb_next: provider needing auth for search has been pruned because no credentials could be found
2025-10-13 09:35:08,334 eodag.core                       [INFO    ] wekeo_main: provider needing auth for search has been pruned because no credentials could be found
2025-10-13 09:35:08,335 eodag.core                       [INFO    ] wekeo_ecmwf: provider needing auth for search has been pruned because no credentials could be found
2025-10-13 09:35:08,335 eodag.core                       [INFO    ] wekeo_cmems: provider needing auth for search has been pruned because no credentials could be found
2025-10-13 09:35:08,335 eodag.core                       [INFO    ] creodias_s3: provider needing auth for search has been pruned because no credentials could be found
2025-10-13 09:35:08,336 eodag.core                       [INFO    ] dedt_lumi: provider needing auth for search has been pruned because no credentials could be found
2025-10-13 09:35:08,336 eodag.core                       [INFO    ] dedl: provider needing auth for search has been pruned because no credentials could be found
2025-10-13 09:35:08,336 eodag.core                       [INFO    ] geodes_s3: provider needing auth for search has been pruned because no credentials could be found
2025-10-13 09:35:08,336 eodag.core                       [INFO    ] cop_ewds: provider needing auth for search has been pruned because no credentials could be found
2025-10-13 09:35:08,337 eodag.core                       [INFO    ] Locations configuration loaded from /home/docs/.config/eodag/locations.yml
[9]:
<eodag.api.core.EODataAccessGateway at 0x7d36d6f79450>
[ ]: