Python dans le cloud avec Windows Azure

Preview:

DESCRIPTION

Python est-il un langage de scripting à la Perl, de développement à la Ruby, ou plutôt un langage utilisé dans le monde de la recherche par des mathématiciens comme Fortran ? Dans cette session, vous verrez que Python joue tous ces rôles, en particulier dans Windows Azure où l’on peut scripter la création de machines virtuelles, développer un site Flask ou Django dans Windows Azure Web Sites, exécuter des notebooks IPython, et même ajouter un peu de logique procédurale à un script HIVE (syntaxe SQL) dans Hadoop. Speakers : Benjamin Guinebertière (Microsoft), Ronan Amicel (Pocket Sensei), Yann Schwartz (Indépendant)

Citation preview

Architecture/Azure/Cloud

Python dans le cloud avec Windows Azure

Benjamin GuinebertièreTechnical Evangelist

Microsoft France@benjguin

Ronan AmicelPocket Sensei

@amicel

Yann Schwartzcriteo

@abolibibelot

Architecture/Azure/Cloud#mstechdays

Depuis votre smartphone sur :http://notes.mstechdays.fr

De nombreux lots à gagner toute les heures !!!Claviers, souris et jeux Microsoft…

Merci de nous aider à améliorer les Techdays !

Donnez votre avis !

Architecture/Azure/Cloud#mstechdays

• Helping teams build better software

• Technology + Agile+ Lean Startup

• "Part-time CTO" for startups

@PocketSenseihttp://pocketsensei.net/

Pocket Sensei

Architecture/Azure/Cloud#mstechdays

• Python• Python Tools for Visual Studio• SDK• Web• IPython• HDInsight

Plan

Architecture/Azure/Cloud#mstechdays

PYTHON

Architecture/Azure/Cloud#mstechdays

• Langage de programmation– dynamique– facile à lire, facile et à apprendre– également orienté objet

• Environnement de script• Disponible dans beaucoup d’environnements

– Unix, Windows, JVM, .NET, …

• Beaucoup de modules– index à https://pypi.python.org

Python

démo

Architecture/Azure/Cloud#mstechdays

HELLO WORLD!

… et un peu plus

Architecture/Azure/Cloud#mstechdays

PYTHON TOOLS FOR VISUAL STUDIO

démo

Architecture/Azure/Cloud#mstechdays

PYTHON DANS VISUAL STUDIO

CPYTHON

démo

Architecture/Azure/Cloud#mstechdays

PYTHON DANS VISUAL STUDIO

Appel d’une librairie C# en IronPython

Architecture/Azure/Cloud#mstechdays

SDK FOR WINDOWS AZURE

Architecture/Azure/Cloud#mstechdays

PYTHON ET WINDOWS AZURE WEB SITES

Architecture/Azure/Cloud#mstechdays

• Django : le plus connu• Flask et Pyramid : légers, modulaires,

extensibles• Bottle : le plus minimaliste

Frameworks web Python

Architecture/Azure/Cloud#mstechdays

Windows Azure Web Sites

Architecture/Azure/Cloud#mstechdays

• Application WSGI• FTP(S) ou git (HTTPS)• Inclure toutes les bibliothèques

requises• fichier web.config: PYTHONPATH et WSGI_HANDLER

Référence: Configuring Python with Windows Azure Web Sites

Déployer du Python dans Azure Web Sites

Architecture/Azure/Cloud#mstechdays

IPYTHON SUR WINDOWS AZURE

démo

Architecture/Azure/Cloud#mstechdays

UTILISER IPYTHON HÉBERGÉ SUR WINDOWS AZURE

démo

Architecture/Azure/Cloud#mstechdays

CRÉER UN CLUSTER IPYTHON EN PYTHON

Architecture/Azure/Cloud#mstechdays

PYTHON + HIVE DANS HDINSIGHT

Architecture/Azure/Cloud#mstechdays

• HDInsight: en complément de HIVE par exemple– HIVE : langage à la SQL– Python : langage procédural

et dans Hadoop ?

Architecture/Azure/Cloud#mstechdays

Appel de Python depuis Hive (Hadoop)insert overwrite table myDestTableselect

transform(s.param1, s.param2)USING 'D:\Python27\python.exe myPythonScript.py' as (col1 string, col2 string, col3 int)

from mySrcTable s;

#(…)

while True: line = sys.stdin.readline() if not line: break

args, tobedropped = string.split(line, "\n", 2) p1,p2 = string.split(args, "\t") col1,col2,col3 = myFunction(p1,p2)

print "\t".join([str(col1), str(col2), str(col3)])

démo

Architecture/Azure/Cloud#mstechdays

HIVE + PYTHON DANS HDINSIGHT

Architecture/Azure/Cloud#mstechdays

Appel de Python depuis Hive

Architecture/Azure/Cloud#mstechdays

• http://www.python.org/• http://www.afpy.org/• http://www.windowsazure.com/• http://git.hupstream.com

Ressources

Architecture/Azure/Cloud#mstechdays

Criteo recrute

29 Mars 2014

http://bit.ly/GWAB2014Paris

Testez dès maintenant Windows Azure !

MSDN: jusqu’à 115€ de

ressources mensuelles

150€ de ressources le 1er mois pour toute

ouverture de compte

Poursuivez la discussion

sur le stand “au coeur du SI”

Partenaires: jusqu’à 75€ de

ressources mensuelles

http://aka.ms/Azure/Partner

http://aka.ms/free/trial

http://aka.ms/MSDN/Avantages/Abo

© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Digital is business

Recommended