services | platforms | author |
---|---|---|
storage |
python |
dineshmurthy |
This demo demonstrates how to perform common tasks using Azure Table storage and Azure Cosmos DB Table API including creating a table, CRUD operations, batch operations and different querying techniques.
If you don't have a Microsoft Azure subscription you can get a FREE trial account here
##Minimum Requirements & Install Instructions Python 2.7, 3.3, or 3.4. To install Python, please go to https://www.python.org/downloads/
Please run 'pip install -r requirements.txt' to set up the Python environment.
- Go to your Azure Cosmos DB Table API instance in the Azure Portal and select "Connection String" in the menu, select the Read-write Keys tab and copy the value in the "CONNECTION STRING" field.
- Open config.py and set IS_EMULATED to False and set STORAGE_CONNECTION_STRING to the connection string value from the previous step.
- Run 'python start.py'
-Introduction to Azure Cosmos DB Table API
This sample can be run using either the Azure Storage Emulator or with your Azure Storage account by updating the config.properties file with your connection string.
To run the sample using the Storage Emulator (Only available on Microsoft Windows OS):
- Download and install the Azure Storage Emulator https://azure.microsoft.com/en-us/downloads/
- Start the Azure Storage Emulator by pressing the Start button or the Windows key and searching for it by typing "Azure Storage Emulator". Select it from the list of applications to start it.
- Open the config.py file and set IS_EMULATED to true.
- Run 'python start.py'
To run the sample using the Storage Service:
- Go to your Azure Storage account in the Azure Portal and under "SETTINGS" click on "Access keys". Copy either key1 or key2's "CONNECTION STRING".
- Open config.py and set IS_EMULATED to False and set STORAGE_CONNECTION_STRING to the connection string value from the previous step.
- Run 'python start.py'
- What is a Storage Account - http://azure.microsoft.com/en-us/documentation/articles/storage-whatis-account/
- Getting Started with Tables - https://azure.microsoft.com/en-us/documentation/articles/storage-python-how-to-use-table-storage/
- Table Service Concepts - http://msdn.microsoft.com/en-us/library/dd179463.aspx
- Table Service REST API - http://msdn.microsoft.com/en-us/library/dd179423.aspx
- Storage Emulator - http://azure.microsoft.com/en-us/documentation/articles/storage-use-emulator/