Created
January 16, 2015 14:04
-
-
Save vtemian/2ffb783b552ca227562a to your computer and use it in GitHub Desktop.
db01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pydocumentdb.document_client as document_client | |
host = 'https://doc01.documents.azure.com' | |
masterKey = 'PhA7+FAD9uHw+McP/sM4CFZA4dUnOrzmgnk0J+SEcvOC5ac7UYNu/EHvOEBcOpEtj6Vz/YESDoxxxsnoaLDCGg==' | |
client = document_client.DocumentClient(host, {'masterKey': masterKey}) | |
databases = client.ReadDatabases() | |
db = [db for db in databases if db['id'] == 'uvt01'][0] | |
print client.CreateCollection(db['_self'], {'Id': 'some_id', 'key': 'value'}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment