CosmosClient to use connectionstring
Closed this issue · 2 comments
mindlessroman commented
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.
wkeithvan commented
+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.
MaLiN2223 commented
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)