Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Azure Functions

You're reading from  Learning Azure Functions

Product type Book
Published in Sep 2017
Publisher Packt
ISBN-13 9781787122932
Pages 240 pages
Edition 1st Edition
Languages
Concepts
Toc

The Python Function App


Let's create a Python Function in Azure App. We already created Azure App in the previous chapter.

Python is still in the experimental phase, so we don't have much of an option as of now.

Now, we will create a Python Function and learn how to install and use third-party modules.

Example

We will create an HTTP request API which gives a weather report in JSON format in response. In this example, we will use Google Weather API, which is open source:

  1. Log into the Azure Portal and create Azure App. We have created Azure App in the previous chapter. Now we will create the function. Click on the + sign and select the language, as shown in the following screenshot:
  1. There are only two options available for us, that is HttpTrigger - Python and QueueTrigger - Python:
    • HttpTrigger - Python: This trigger gets fired whenever it receives an Http request
    • QueueTrigger - Python: This trigger gets fired when a message is added to specified Azure Queue storage
  2. Select HttpTrigger - Python. Now...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime