This approach of copy-pasting toplevel functions scales quite ugly and ruins code intelligence in your editor/IDE.
It would be cleaner to encapsulate this intermediate "API" e.g. as (abstract) classes that backends have to implement. This is more explicit API-wise, more self documenting and allows your IDE to be more helpful.
openeo-python-driver allows a plugable "DRIVER_IMPLEMENTATION_PACKAGE", but does this quite rudimentary at the moment. E.g:
( https://github.com/Open-EO/openeo-python-driver/blob/314023137/openeo_driver/ProcessGraphDeserializer.py#L67 )
This approach of copy-pasting toplevel functions scales quite ugly and ruins code intelligence in your editor/IDE.
It would be cleaner to encapsulate this intermediate "API" e.g. as (abstract) classes that backends have to implement. This is more explicit API-wise, more self documenting and allows your IDE to be more helpful.