20
Developing Python Apps on Windows Azure Eric ShangKuan (ericsk) Technical Evangelist Microsoft Taiwan

Building Python Applications on Windows Azure

Embed Size (px)

DESCRIPTION

I introduced how to develop python applications on Windows Azure.

Citation preview

Page 1: Building Python Applications on Windows Azure

Developing Python Apps on Windows Azure

Eric ShangKuan (ericsk)Technical Evangelist Microsoft Taiwan

Page 2: Building Python Applications on Windows Azure

NCTU2000 ~ 2004

上官林傑 (Eric)Technical Evangelist, MS

NTU2004 ~ 2006

CHT2007 ~ 2011

Taipei GTUG2009 ~ 2010

Microsoft2011 ~ ?

Page 3: Building Python Applications on Windows Azure
Page 4: Building Python Applications on Windows Azure

Agenda

What is Windows Azure

How Python Runs

Live Demo

Call to Action

Page 5: Building Python Applications on Windows Azure

http://www.windowsazure.com/zh-tw/

Windows Azure

Page 6: Building Python Applications on Windows Azure

Windows Azure

Web Sites Virtual Machines Cloud Services Big Data Media

Page 7: Building Python Applications on Windows Azure

Windows Azure Web Sites

Quickly launch a website (.net/php hosted)Free for Shared-Hosting

Page 8: Building Python Applications on Windows Azure

Windows Azure Virtual Machines

Create VM you like (IaaS)

Page 9: Building Python Applications on Windows Azure

Windows Azure Cloud Services (PaaS), Big Data, Media

Cloud service: Web/Worker role

SQL Database: Relational database

Caching and CDN

Service Bus: Hybrid cloud

Page 10: Building Python Applications on Windows Azure

How Python Runs

Page 11: Building Python Applications on Windows Azure

Cloud Service: Web/Worker Role• PaaS, not VM (django ready)• Packaging, publishing through Visual Studio (In SDK)

Page 12: Building Python Applications on Windows Azure

Cloud-ize Your Django Application

1. Create Project

2. Add Azure Cloud Service Project

3. Publish

Page 13: Building Python Applications on Windows Azure

Demo

Use WA Cloud Service

Page 14: Building Python Applications on Windows Azure

Virtual Machine (IaaS)• Full control the VM• Use your favorite stacks

Page 15: Building Python Applications on Windows Azure

Demo

Apache + wsgi + django

Django app on WA VM

Page 16: Building Python Applications on Windows Azure

Using Windows Azure Storage• Access Windows Azure Storage (Blob, Table, Queue)

in your Python apps• Install via pip: pip install azure

Page 17: Building Python Applications on Windows 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)

Page 18: Building Python Applications on Windows Azure

Demo

Accessing WA Storage

Page 19: Building Python Applications on Windows Azure

Recap

Web, Apps, VMs on Windows Azure

Django apps run on Windows Azure

Python Tools for Visual Studio is awesome

Using Windows Azure storages

Page 20: Building Python Applications on Windows Azure

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