Utils

Logging

eodag.utils.logging.get_logging_verbose()[source]

Get logging verbose level

>>> from eodag import setup_logging
>>> get_logging_verbose()
>>> setup_logging(verbose=0)
>>> get_logging_verbose()
0
>>> setup_logging(verbose=1)
>>> get_logging_verbose()
1
>>> setup_logging(verbose=2)
>>> get_logging_verbose()
2
>>> setup_logging(verbose=3)
>>> get_logging_verbose()
3
Returns

Verbose level in [0, 1, 2, 3] or None if not set

Return type

int or None

eodag.utils.logging.setup_logging(verbose, no_progress_bar=False)[source]

Define logging level

Parameters
  • verbose (int) –

    Accepted values:

    • 0: no logging with muted progress bars

    • 1: no logging but still displays progress bars

    • 2: INFO level

    • 3: DEBUG level

  • no_progress_bar (bool) – (optional) Disable progress bars

Callbacks

eodag.utils.DownloadedCallback()[source]

Example class for callback after each download in download_all()

eodag.utils.ProgressCallback(*_, **__)[source]

A callable used to render progress to users for long running processes.

It inherits from tqdm.auto.tqdm, and accepts the same arguments on instantiation: iterable, desc, total, leave, file, ncols, mininterval, maxinterval, miniters, ascii, disable, unit, unit_scale, dynamic_ncols, smoothing, bar_format, initial, position, postfix, unit_divisor.

It can be globally disabled using eodag.utils.logging.setup_logging(0) or eodag.utils.logging.setup_logging(level, no_progress_bar=True), and individually disabled using disable=True.

Notebook

class eodag.utils.notebook.NotebookWidgets[source]

Display / handle ipython widgets

clear_html()[source]

Clear HTML message

display_html(html_value)[source]

Display HTML message

eodag.utils.notebook.check_ipython()[source]

Check if called from ipython

eodag.utils.notebook.check_notebook()[source]

Check if called from a notebook