The plotly authors recently released a new tool called Kaleido, allowing to generate static images locally, without a browser. It relies on a native process running in the background. We can exchange JSON messages with that process to generate images.