Gremlin Python SDK for Azure CosmosDB

Author: aronchick

Originally Sourced from: https://stackoverflow.com/questions/61641745/gremlin-python-sdk-for-azure-cosmosdb

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?

[1] https://docs.microsoft.com/en-us/samples/azure-samples/azure-cosmos-db-graph-python-getting-started/azure-cosmos-db-graph-python-getting-started/

[2] https://docs.microsoft.com/en-us/azure/cosmos-db/create-graph-pytho

[3] https://github.com/Azure-Samples/azure-cosmos-db-python-getting-started

[4] https://github.com/Azure/azure-cosmos-dotnet-v2/issues/439