SlideShare a Scribd company logo
Python Azure Functions
Azure Developer Stories
KonfHub
@dhilipsiva
10 years of experience in Python, JavaScript,
DevOps & more
Optimistic Nihilist.
Wannabe Astrophysicist.
I code for fun & pro t.
I love Science, Python, FOSS & tness.
Dad of 2. Environmentalist. Story Teller. Gamer.
Jack of all trades & Master of none
http://dhilipsiva.com
dhilipsiva@gmail.com
I have no idea what I am
talking about
Azure Functions
Event-driven serverless compute platform
On-demand service
Provides a continually-updated infrastructure
You can build web APIs, respond to database
changes, process IoT streams, manage message
queues, and more.
Only worry about our app and not infrastructure
Automatically scales
Supported Languages
Python
C#
Go
Java
JavaScript / TypeScript
PowerShell
Rust
Any other Language (Custom Image + PowerShell)
Deployment Approaches
1. Commandline
2. VS Code (with an of cial azure plugin)
I will be taking the command line approach on my
Debian machine as it's easier for me. So the rest of
the talk will use this method.
If you are someone who likes to use GUI tools, you
should probably opt for VS Code approach:
https://docs.microsoft.com/en-us/azure/azure-
functions/create- rst-function-vs-code-python
Prerequisites
Azure Account : https://portal.azure.com/
Azure Functions Core Tools : Used for creating
projects & apps, testing Functions locally,
deploying, logs, etc.
Azure CLI : For managing Azure Cloud Reources
Python 3.8 (or 3.7, 3.6) : Azure only supports
Python 3.x
Azure Functions Core Tools
Install the Microsoft package repository GPG key
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dea
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
Set up the APT source
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/
Install the Core Tools package ( func binary)
sudo apt-get update
sudo apt-get install azure-functions-core-tools-3
Azure CLI ( az binary)
Install using a script (maintained by Azure team)
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
Azure Login
az login
If you want to list available locations
az account list-locations
Alternative installs
Azure Functions Core tools:
https://docs.microsoft.com/en-us/azure/azure-
functions/functions-run-local
Azure CLI: https://docs.microsoft.com/en-
us/cli/azure/install-azure-cli-linux
Creating Project and Apps
Create Project
func init $PROJECT_NAME --python
Create Function
func new 
--name $FUNCTION_NAME 
--template "HTTP trigger" 
--authlevel "anonymous"
Run locally
func start
Creating Azure Resources
Create Resource Group
az group create 
--name $GROUP_NAME 
--location $LOCATION_NAME
General-purpose storage account
az storage account create 
--name $STORAGE_NAME 
--location $LOCATION_NAME 
--resource-group $GROUP_NAME 
--sku Standard_LRS
Creating Resources (contd.)
Create the function app in Azure
az functionapp create 
--resource-group $GROUP_NAME 
--consumption-plan-location $LOCATION_NAME 
--runtime python 
--runtime-version 3.8 
--functions-version 3 
--name $APP_NAME 
--storage-account $STORAGE_NAME 
--os-type linux
Deploy
func azure functionapp publish $APP_NAME
Logs
func azure functionapp logstream $APP_NAME --browser
Delete Azure Resources
az group delete --name $GROUP_NAME
Thanks!
dhilipsiva@pm.me
http://dhilipsiva.com
https://github.com/dhilipsiva/talks
http://www.slideshare.net/dhilipsiva
Source Code: https://github.com/reckonsys/python-
azure-functions-demo
Questions

More Related Content

What's hot

Automated Deployment with Fabric
Automated Deployment with FabricAutomated Deployment with Fabric
Automated Deployment with Fabrictanihito
 
Fabric - a server management tool from Instagram
Fabric - a server management tool from InstagramFabric - a server management tool from Instagram
Fabric - a server management tool from Instagram
Jay Ren
 
ECSをやろうとしました
ECSをやろうとしましたECSをやろうとしました
ECSをやろうとしました
晋也 古渡
 
Cross platform mobile apps using .NET
Cross platform mobile apps using .NETCross platform mobile apps using .NET
Cross platform mobile apps using .NET
Jonas Follesø
 
Distributed tracing for Node.js
Distributed tracing for Node.jsDistributed tracing for Node.js
Distributed tracing for Node.js
Nikolay Stoitsev
 
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015
Alex S
 
Advance discussion on Ansible - Rahul Inti
Advance discussion on Ansible - Rahul IntiAdvance discussion on Ansible - Rahul Inti
Advance discussion on Ansible - Rahul Inti
Sahil Davawala
 
The Puppet Master on the JVM - PuppetConf 2014
The Puppet Master on the JVM - PuppetConf 2014The Puppet Master on the JVM - PuppetConf 2014
The Puppet Master on the JVM - PuppetConf 2014
Puppet
 
Cheap HPC
Cheap HPCCheap HPC
Cheap HPC
Alex Moore
 
Compcon 2016 Workshop
Compcon 2016 WorkshopCompcon 2016 Workshop
Compcon 2016 Workshop
Steven Cooper
 
A quick intro to Ansible
A quick intro to AnsibleA quick intro to Ansible
A quick intro to Ansible
Dan Vaida
 
Basics of Ansible - Sahil Davawala
Basics of Ansible - Sahil DavawalaBasics of Ansible - Sahil Davawala
Basics of Ansible - Sahil Davawala
Sahil Davawala
 
DevOps Days India 2013: Build Radiator on Raspberry Pi
DevOps Days India 2013: Build Radiator on Raspberry PiDevOps Days India 2013: Build Radiator on Raspberry Pi
DevOps Days India 2013: Build Radiator on Raspberry PiAkshay Karle
 
Composer Tutorial (PHP Hampshire Sept 2013)
Composer Tutorial (PHP Hampshire Sept 2013)Composer Tutorial (PHP Hampshire Sept 2013)
Composer Tutorial (PHP Hampshire Sept 2013)
James Titcumb
 
Automating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and AnsibleAutomating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and Ansible
Brian Hogan
 
Deploying Rails applications with Moonshine
Deploying Rails applications with MoonshineDeploying Rails applications with Moonshine
Deploying Rails applications with Moonshine
Robot Mode
 
Eclipse SCADA Release 0.1.0
Eclipse SCADA Release 0.1.0Eclipse SCADA Release 0.1.0
Eclipse SCADA Release 0.1.0
dentrassi1
 
Productive OpenCL with Intel Xeon Phi Coprocessors
Productive OpenCL with Intel Xeon Phi CoprocessorsProductive OpenCL with Intel Xeon Phi Coprocessors
Productive OpenCL with Intel Xeon Phi Coprocessors
Intel IT Center
 
Machine learning in Apache Zeppelin
Machine learning in Apache ZeppelinMachine learning in Apache Zeppelin
Machine learning in Apache Zeppelin
Gary Sieling
 
Building and Testing Puppet with Docker
Building and Testing Puppet with DockerBuilding and Testing Puppet with Docker
Building and Testing Puppet with Docker
carlaasouza
 

What's hot (20)

Automated Deployment with Fabric
Automated Deployment with FabricAutomated Deployment with Fabric
Automated Deployment with Fabric
 
Fabric - a server management tool from Instagram
Fabric - a server management tool from InstagramFabric - a server management tool from Instagram
Fabric - a server management tool from Instagram
 
ECSをやろうとしました
ECSをやろうとしましたECSをやろうとしました
ECSをやろうとしました
 
Cross platform mobile apps using .NET
Cross platform mobile apps using .NETCross platform mobile apps using .NET
Cross platform mobile apps using .NET
 
Distributed tracing for Node.js
Distributed tracing for Node.jsDistributed tracing for Node.js
Distributed tracing for Node.js
 
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015
 
Advance discussion on Ansible - Rahul Inti
Advance discussion on Ansible - Rahul IntiAdvance discussion on Ansible - Rahul Inti
Advance discussion on Ansible - Rahul Inti
 
The Puppet Master on the JVM - PuppetConf 2014
The Puppet Master on the JVM - PuppetConf 2014The Puppet Master on the JVM - PuppetConf 2014
The Puppet Master on the JVM - PuppetConf 2014
 
Cheap HPC
Cheap HPCCheap HPC
Cheap HPC
 
Compcon 2016 Workshop
Compcon 2016 WorkshopCompcon 2016 Workshop
Compcon 2016 Workshop
 
A quick intro to Ansible
A quick intro to AnsibleA quick intro to Ansible
A quick intro to Ansible
 
Basics of Ansible - Sahil Davawala
Basics of Ansible - Sahil DavawalaBasics of Ansible - Sahil Davawala
Basics of Ansible - Sahil Davawala
 
DevOps Days India 2013: Build Radiator on Raspberry Pi
DevOps Days India 2013: Build Radiator on Raspberry PiDevOps Days India 2013: Build Radiator on Raspberry Pi
DevOps Days India 2013: Build Radiator on Raspberry Pi
 
Composer Tutorial (PHP Hampshire Sept 2013)
Composer Tutorial (PHP Hampshire Sept 2013)Composer Tutorial (PHP Hampshire Sept 2013)
Composer Tutorial (PHP Hampshire Sept 2013)
 
Automating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and AnsibleAutomating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and Ansible
 
Deploying Rails applications with Moonshine
Deploying Rails applications with MoonshineDeploying Rails applications with Moonshine
Deploying Rails applications with Moonshine
 
Eclipse SCADA Release 0.1.0
Eclipse SCADA Release 0.1.0Eclipse SCADA Release 0.1.0
Eclipse SCADA Release 0.1.0
 
Productive OpenCL with Intel Xeon Phi Coprocessors
Productive OpenCL with Intel Xeon Phi CoprocessorsProductive OpenCL with Intel Xeon Phi Coprocessors
Productive OpenCL with Intel Xeon Phi Coprocessors
 
Machine learning in Apache Zeppelin
Machine learning in Apache ZeppelinMachine learning in Apache Zeppelin
Machine learning in Apache Zeppelin
 
Building and Testing Puppet with Docker
Building and Testing Puppet with DockerBuilding and Testing Puppet with Docker
Building and Testing Puppet with Docker
 

Similar to Deploy your Python code on Azure Functions

One-Man Ops
One-Man OpsOne-Man Ops
One-Man Ops
Jos Boumans
 
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Amazon Web Services
 
Continuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventContinuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:Invent
John Schneider
 
Going serverless with azure functions
Going serverless with azure functionsGoing serverless with azure functions
Going serverless with azure functions
gjuljo
 
Gruntwork Executive Summary
Gruntwork Executive SummaryGruntwork Executive Summary
Gruntwork Executive Summary
Yevgeniy Brikman
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
Brian Lyttle
 
Azure serverless Full-Stack kickstart
Azure serverless Full-Stack kickstartAzure serverless Full-Stack kickstart
Azure serverless Full-Stack kickstart
Davide Mauri
 
Azure DevOps työkalut - Roundtable 14.3.2019
Azure DevOps työkalut - Roundtable 14.3.2019Azure DevOps työkalut - Roundtable 14.3.2019
Azure DevOps työkalut - Roundtable 14.3.2019
Janne Mattila
 
Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019
Andrea Tosato
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabricandymccurdy
 
Function as a Service
Function as a ServiceFunction as a Service
Function as a Service
rich fernandez
 
Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros
Usama Wahab Khan Cloud, Data and AI
 
Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024
Henry Schreiner
 
AWS CodeDeploy - basic intro
AWS CodeDeploy - basic introAWS CodeDeploy - basic intro
AWS CodeDeploy - basic intro
Anton Babenko
 
AWS CodeDeploy + Github
AWS CodeDeploy + GithubAWS CodeDeploy + Github
AWS CodeDeploy + Github
HyunJin CHA
 
Keynote Microsoft Azure Summit
Keynote Microsoft Azure SummitKeynote Microsoft Azure Summit
Keynote Microsoft Azure Summit
Danilo Bordini
 
Deployment automation
Deployment automationDeployment automation
Deployment automation
Riccardo Lemmi
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Bastian Feder
 
Making the most of your Test Suite
Making the most of your Test SuiteMaking the most of your Test Suite
Making the most of your Test Suiteericholscher
 

Similar to Deploy your Python code on Azure Functions (20)

One-Man Ops
One-Man OpsOne-Man Ops
One-Man Ops
 
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
Continuous Integration and Deployment Best Practices on AWS (ARC307) | AWS re...
 
Continuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:InventContinuous Deployment @ AWS Re:Invent
Continuous Deployment @ AWS Re:Invent
 
Going serverless with azure functions
Going serverless with azure functionsGoing serverless with azure functions
Going serverless with azure functions
 
Gruntwork Executive Summary
Gruntwork Executive SummaryGruntwork Executive Summary
Gruntwork Executive Summary
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
 
Azure serverless Full-Stack kickstart
Azure serverless Full-Stack kickstartAzure serverless Full-Stack kickstart
Azure serverless Full-Stack kickstart
 
January 2011 HUG: Pig Presentation
January 2011 HUG: Pig PresentationJanuary 2011 HUG: Pig Presentation
January 2011 HUG: Pig Presentation
 
Azure DevOps työkalut - Roundtable 14.3.2019
Azure DevOps työkalut - Roundtable 14.3.2019Azure DevOps työkalut - Roundtable 14.3.2019
Azure DevOps työkalut - Roundtable 14.3.2019
 
Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
 
Function as a Service
Function as a ServiceFunction as a Service
Function as a Service
 
Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros
 
Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024
 
AWS CodeDeploy - basic intro
AWS CodeDeploy - basic introAWS CodeDeploy - basic intro
AWS CodeDeploy - basic intro
 
AWS CodeDeploy + Github
AWS CodeDeploy + GithubAWS CodeDeploy + Github
AWS CodeDeploy + Github
 
Keynote Microsoft Azure Summit
Keynote Microsoft Azure SummitKeynote Microsoft Azure Summit
Keynote Microsoft Azure Summit
 
Deployment automation
Deployment automationDeployment automation
Deployment automation
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
 
Making the most of your Test Suite
Making the most of your Test SuiteMaking the most of your Test Suite
Making the most of your Test Suite
 

More from Dhilipsiva DS

Introduction To DevOps Workshop @ New Horizon College
Introduction To DevOps Workshop @ New Horizon College Introduction To DevOps Workshop @ New Horizon College
Introduction To DevOps Workshop @ New Horizon College
Dhilipsiva DS
 
Build, deploy and scale: Django, GraphQL and SPA (DjangoCon EU 2021)
Build, deploy and scale: Django, GraphQL and SPA  (DjangoCon EU 2021)Build, deploy and scale: Django, GraphQL and SPA  (DjangoCon EU 2021)
Build, deploy and scale: Django, GraphQL and SPA (DjangoCon EU 2021)
Dhilipsiva DS
 
Garuda: Automagically Exposing Djagno ORM over gRPC for microservices written...
Garuda: Automagically Exposing Djagno ORM over gRPC for microservices written...Garuda: Automagically Exposing Djagno ORM over gRPC for microservices written...
Garuda: Automagically Exposing Djagno ORM over gRPC for microservices written...
Dhilipsiva DS
 
AWS LearnUp - Intro to AWS Services - Venturesity
AWS LearnUp - Intro to AWS Services - VenturesityAWS LearnUp - Intro to AWS Services - Venturesity
AWS LearnUp - Intro to AWS Services - Venturesity
Dhilipsiva DS
 
Python Workshop Day - 2 (REVA University)
Python Workshop Day - 2 (REVA University)Python Workshop Day - 2 (REVA University)
Python Workshop Day - 2 (REVA University)
Dhilipsiva DS
 
Full-Stack Development
Full-Stack DevelopmentFull-Stack Development
Full-Stack Development
Dhilipsiva DS
 
BangML Meetup 1: The Path to Becoming an Machine Learning Expert
BangML Meetup 1: The Path to Becoming an Machine Learning ExpertBangML Meetup 1: The Path to Becoming an Machine Learning Expert
BangML Meetup 1: The Path to Becoming an Machine Learning Expert
Dhilipsiva DS
 
Architecture @ Appknox
Architecture @ AppknoxArchitecture @ Appknox
Architecture @ Appknox
Dhilipsiva DS
 
Microservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and DockerMicroservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and Docker
Dhilipsiva DS
 
Container (Docker) Orchestration Tools
Container (Docker) Orchestration ToolsContainer (Docker) Orchestration Tools
Container (Docker) Orchestration Tools
Dhilipsiva DS
 
IEEE
IEEEIEEE
MuLiST
MuLiSTMuLiST

More from Dhilipsiva DS (12)

Introduction To DevOps Workshop @ New Horizon College
Introduction To DevOps Workshop @ New Horizon College Introduction To DevOps Workshop @ New Horizon College
Introduction To DevOps Workshop @ New Horizon College
 
Build, deploy and scale: Django, GraphQL and SPA (DjangoCon EU 2021)
Build, deploy and scale: Django, GraphQL and SPA  (DjangoCon EU 2021)Build, deploy and scale: Django, GraphQL and SPA  (DjangoCon EU 2021)
Build, deploy and scale: Django, GraphQL and SPA (DjangoCon EU 2021)
 
Garuda: Automagically Exposing Djagno ORM over gRPC for microservices written...
Garuda: Automagically Exposing Djagno ORM over gRPC for microservices written...Garuda: Automagically Exposing Djagno ORM over gRPC for microservices written...
Garuda: Automagically Exposing Djagno ORM over gRPC for microservices written...
 
AWS LearnUp - Intro to AWS Services - Venturesity
AWS LearnUp - Intro to AWS Services - VenturesityAWS LearnUp - Intro to AWS Services - Venturesity
AWS LearnUp - Intro to AWS Services - Venturesity
 
Python Workshop Day - 2 (REVA University)
Python Workshop Day - 2 (REVA University)Python Workshop Day - 2 (REVA University)
Python Workshop Day - 2 (REVA University)
 
Full-Stack Development
Full-Stack DevelopmentFull-Stack Development
Full-Stack Development
 
BangML Meetup 1: The Path to Becoming an Machine Learning Expert
BangML Meetup 1: The Path to Becoming an Machine Learning ExpertBangML Meetup 1: The Path to Becoming an Machine Learning Expert
BangML Meetup 1: The Path to Becoming an Machine Learning Expert
 
Architecture @ Appknox
Architecture @ AppknoxArchitecture @ Appknox
Architecture @ Appknox
 
Microservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and DockerMicroservices with Swagger, Flask and Docker
Microservices with Swagger, Flask and Docker
 
Container (Docker) Orchestration Tools
Container (Docker) Orchestration ToolsContainer (Docker) Orchestration Tools
Container (Docker) Orchestration Tools
 
IEEE
IEEEIEEE
IEEE
 
MuLiST
MuLiSTMuLiST
MuLiST
 

Recently uploaded

Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 

Recently uploaded (20)

Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 

Deploy your Python code on Azure Functions

  • 1. Python Azure Functions Azure Developer Stories KonfHub @dhilipsiva
  • 2. 10 years of experience in Python, JavaScript, DevOps & more Optimistic Nihilist. Wannabe Astrophysicist. I code for fun & pro t. I love Science, Python, FOSS & tness. Dad of 2. Environmentalist. Story Teller. Gamer. Jack of all trades & Master of none http://dhilipsiva.com dhilipsiva@gmail.com
  • 3. I have no idea what I am talking about
  • 4. Azure Functions Event-driven serverless compute platform On-demand service Provides a continually-updated infrastructure You can build web APIs, respond to database changes, process IoT streams, manage message queues, and more. Only worry about our app and not infrastructure Automatically scales
  • 5. Supported Languages Python C# Go Java JavaScript / TypeScript PowerShell Rust Any other Language (Custom Image + PowerShell)
  • 6. Deployment Approaches 1. Commandline 2. VS Code (with an of cial azure plugin) I will be taking the command line approach on my Debian machine as it's easier for me. So the rest of the talk will use this method. If you are someone who likes to use GUI tools, you should probably opt for VS Code approach: https://docs.microsoft.com/en-us/azure/azure- functions/create- rst-function-vs-code-python
  • 7. Prerequisites Azure Account : https://portal.azure.com/ Azure Functions Core Tools : Used for creating projects & apps, testing Functions locally, deploying, logs, etc. Azure CLI : For managing Azure Cloud Reources Python 3.8 (or 3.7, 3.6) : Azure only supports Python 3.x
  • 8. Azure Functions Core Tools Install the Microsoft package repository GPG key curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dea sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg Set up the APT source sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/ Install the Core Tools package ( func binary) sudo apt-get update sudo apt-get install azure-functions-core-tools-3
  • 9. Azure CLI ( az binary) Install using a script (maintained by Azure team) curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash Azure Login az login If you want to list available locations az account list-locations
  • 10. Alternative installs Azure Functions Core tools: https://docs.microsoft.com/en-us/azure/azure- functions/functions-run-local Azure CLI: https://docs.microsoft.com/en- us/cli/azure/install-azure-cli-linux
  • 11. Creating Project and Apps Create Project func init $PROJECT_NAME --python Create Function func new --name $FUNCTION_NAME --template "HTTP trigger" --authlevel "anonymous" Run locally func start
  • 12. Creating Azure Resources Create Resource Group az group create --name $GROUP_NAME --location $LOCATION_NAME General-purpose storage account az storage account create --name $STORAGE_NAME --location $LOCATION_NAME --resource-group $GROUP_NAME --sku Standard_LRS
  • 13. Creating Resources (contd.) Create the function app in Azure az functionapp create --resource-group $GROUP_NAME --consumption-plan-location $LOCATION_NAME --runtime python --runtime-version 3.8 --functions-version 3 --name $APP_NAME --storage-account $STORAGE_NAME --os-type linux
  • 14. Deploy func azure functionapp publish $APP_NAME Logs func azure functionapp logstream $APP_NAME --browser
  • 15. Delete Azure Resources az group delete --name $GROUP_NAME