Gremlin Python SDK for Azure CosmosDB

Author: aronchick

Originally Sourced from:

The documentation on the Azure site for CosmoDB & Gremlin & Python[1][2][3] use bad practices - tons of code duplication and concatenating strings to form queries, rather than using native python.

However, when trying to use the native SDK, there's a 2 year old bug that prevents it due to serialization errors[4].

What's the best way to use Gremlin & Python with CosmosDB? Should I give up on Gremlin altogether - and if so, what's the alternative solution?