developing python apps on windows azure

Post on 13-May-2015

2.571 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

by 上官林傑 (ericsk)

TRANSCRIPT

Azure

Azure

Azure

How Python Runs

1. Create Project

2. Add Azure Cloud Service Project

3. Publish

pip install azure

# init an azure table service instance from azure import storage ts = storage.TableService(account_name='<STORAGE_NAME>', account_key='<STORAGE_KEY>') # create table ts.create_table('MY_TABLE_NAME') # add an entity ts.insert_entity('MY_TABLE_NAME', { 'PartitionKey': 'hello1234', 'RowKey': '20120610', 'name': 'Eric', 'say': 'PyCon Taiwan rocks!' }) # list entities... entities = ts.query_entities('MY_TABLE_NAME', '', 'name,say') for entity in entities: print '%s: %s' % (entity.name, entity.say)

top related