It is possible to query ESASky using a dedicated module within the python Astroquery package. The module should be included in the latest version of Astroquery, which can be installed via pip:

pip install astroquery

Alternatively, you can grab the latest Astroquery version with the ESASky module from GitHub.

The documentation for the module can be found hereThis Jupyter notebook presents some very simple use cases (click here for an HTML version of the notebook).

An example of a more advanced use case can be found in this other notebook (HTML version here).