Developing Python Apps on Windows Azure

Post on 13-May-2015

2.572 views 0 download

Tags:

description

by 上官林傑 (ericsk)

Transcript of Developing Python Apps on Windows Azure

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)