building python applications on windows azure
DESCRIPTION
I introduced how to develop python applications on Windows Azure.TRANSCRIPT
Developing Python Apps on Windows Azure
Eric ShangKuan (ericsk)Technical Evangelist Microsoft Taiwan
NCTU2000 ~ 2004
上官林傑 (Eric)Technical Evangelist, MS
NTU2004 ~ 2006
CHT2007 ~ 2011
Taipei GTUG2009 ~ 2010
Microsoft2011 ~ ?
Agenda
What is Windows Azure
How Python Runs
Live Demo
Call to Action
Windows Azure
Web Sites Virtual Machines Cloud Services Big Data Media
Windows Azure Web Sites
Quickly launch a website (.net/php hosted)Free for Shared-Hosting
Windows Azure Virtual Machines
Create VM you like (IaaS)
Windows Azure Cloud Services (PaaS), Big Data, Media
Cloud service: Web/Worker role
SQL Database: Relational database
Caching and CDN
Service Bus: Hybrid cloud
How Python Runs
Cloud Service: Web/Worker Role• PaaS, not VM (django ready)• Packaging, publishing through Visual Studio (In SDK)
Cloud-ize Your Django Application
1. Create Project
2. Add Azure Cloud Service Project
3. Publish
Demo
Use WA Cloud Service
Virtual Machine (IaaS)• Full control the VM• Use your favorite stacks
Demo
Apache + wsgi + django
Django app on WA VM
Using Windows Azure Storage• Access Windows Azure Storage (Blob, Table, Queue)
in your Python apps• Install via pip: pip install azure
Example: using Windows Azure Table# init an azure table service instancefrom azure import storagets = storage.TableService(account_name='<STORAGE_NAME>', account_key='<STORAGE_KEY>')
# create tablets.create_table('MY_TABLE_NAME')
# add an entityts.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)
Demo
Accessing WA Storage
Recap
Web, Apps, VMs on Windows Azure
Django apps run on Windows Azure
Python Tools for Visual Studio is awesome
Using Windows Azure storages
Call to Action• Try Windows Azure now for a 3-month free-trial
http://www.windowsazure.com/zh-tw/
• Learn Python development on Windows Azure:http://www.windowsazure.com/en-us/develop/python/
• Check out the open source tools:https://github.com/WindowsAzurehttps://github.com/WindowsAzure/azure-sdk-for-python
• Contact me if you successfully bring your Python web/apps onto Windows Azure