Try using contextily
(Introduction guide to contextily — contextily 1.1.0 documentation). They have CartoDB.positron and OpenStreetMap listed at A short look into providers objects — contextily 1.1.0 documentation.
As an aside, I’ve actually been thinking whether it’s worth integrating PyGMT with contextily so that users can get a choice of different basemaps. They have a bounds2img
function that returns an RGBA numpy array, which we could georeference into an xarray.DataArray
and possibly use as a basemap.