Skip to content

Instantly share code, notes, and snippets.

@rchardptrsn
Created February 9, 2020 19:27
Show Gist options
  • Save rchardptrsn/4ac635c6b81f5d0ce7580ec122305eb4 to your computer and use it in GitHub Desktop.
Save rchardptrsn/4ac635c6b81f5d0ce7580ec122305eb4 to your computer and use it in GitHub Desktop.
import pandas as pd
import json
import azure.cosmos.cosmos_client as cosmos_client
import azure.cosmos.errors as errors
import azure.cosmos.documents as documents
import azure.cosmos.http_constants as http_constants
print('Imported packages successfully.')
# Initialize the Cosmos client
config = {
"endpoint": "YOUR ENDPOINT HERE",
"primarykey": "YOUR PRIMARY KEY HERE"
}
# Create the cosmos client
client = cosmos_client.CosmosClient(url_connection=config["endpoint"], auth={"masterKey":config["primarykey"]}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment