Azure/azure-cosmos-python

CosmosClient to use connectionstring

Closed this issue · 2 comments

Similar to azure-cosmos-js's issue #184, the Python SDK lacks the feature parity to the .NET CosmosClient class. A bit of a bummer; in the meantime, will have to parse a provided connection string. If the SDK is being provided in another language, having the same features across the original and other SDKs should be expected.

+1... Azure needs to be able to support parsing its own format and not rely on the end user to write a parsing script for this.

Looks like this is solved in version 4.0.0b2
from the changelog:

A new classmethod constructor has been added to CosmosClient to enable creation via a connection string retrieved from the Azure portal.

You can now

from azure.cosmos import cosmos_client
cosmos_client.CosmosClient.from_connection_string(connection_string)