Deploy Python to the cloud faster with Azure Serverless
Hollan, Jeff
Bringing your Python scripts or apps and running them in the cloud is easier than ever with serverless computing. In this talk, we’ll show how you can use Azure Functions to easily deploy and scale your Python workloads without having to manage any servers or pay for unused compute resources. We’ll also show how deep integration with Visual Studio Code offers a great local development experience with full support for debugging and testing your app, and allows you to seamlessly deploy your serverless code to the cloud. We’ll start by giving a brief overview of the value of serverless computing. Next, we'll create a brand new Python app in Visual Studio Code, and start to add in business logic and ML capabilities. Once we get the app running debugged locally, we’ll publish it to the cloud as a serverless function, and demonstrate the serverless scalability. Finally, we’ll walk you through the tools and capabilities you can leverage around monitoring and management of your Python Azure Functions.
 All right, welcome everyone. We have 30 minutes. There's a bunch that I want to cover today. So first off, as was mentioned, I'm Jeff Holland. I am a program manager. I work in the engineering team out of Seattle. So I was very excited for the chance to travel out here with a few members from our team as well and talk to you today about Python and specifically with Azure Serverless. Now before we start, just to get a feel for the room, how many of you here have already used Serverless in some form or fashion? That's AWS Lambda, Azure Functions, Google Cloud Functions. Great, so about 20 percent. Then of those, how many of you has used Azure Functions specifically? Very few. Great. So everyone will learn something today. Let's get started then. So for those who maybe didn't raise their hand, before I even start, I want to set some context. Like what is Serverless? What is with all of the people talking about Serverless? How much is hype? How much is just vapor? To explain how I think about Serverless, I wanted to use this analogy. That's how did I get here today or how did any of you get here today? Specifically, this one, the public transportation in Switzerland is a little bit better than when I give this talk elsewhere in maybe the United States. But for me, I landed at the airport yesterday morning, and I had a problem to solve. How do I get from the airport to the Congress Center? There was one option. I'm only going to be here for a few days. I could have bought a car. I could have walked from the airport to a car dealership. I assume there's one close. I could have picked out a car, put down whatever a couple of thousand euros, registered that car with the government. I assume that on an American passport, I could buy a car, I don't even know, pay taxes. There's a lot that that would involve. I would now be maintaining that car. I would need to make sure that it had fuel. I'd need to navigate to the Congress Center. Now I own this massive asset of a car for my trip to Switzerland might be a little bit overkill. So the other option that's pretty popular is maybe I could just rent a car. Rather than just purchase one outright, maybe I walk down to the car rental like Avis or something and I say, hey, I'm going to be here for four days. Can I have a car for four days? Like sure, here's the keys, you're going to pay 50 euros a day in this car is yours. So now it's a lot easier to buy a car. I don't have to worry about changing the oil. I don't have to worry about paying taxes or registering the vehicle. Now the only things I have to care about are making sure that it has fuel. I still have to look up directions to the Congress Center. For times like right now where I'm not driving, I'm actually in front of all of you talking, I'm still paying for my rental car. Whether I'm using it or not, I'm still paying that daily rate. So the last option, which is actually what I'd use whenever I travel, is ride share. This is the ability so that I really go to the airport. I opened up the Uber app. I said, hey, I need to get from the airport to the Congress Center. Immediately a car pulled up. They said, hey, Jeff, come on in. I jumped in the backseat. Payment was taken care of. I didn't ever think about directions. I couldn't tell you how I got here. It just happened. The driver was concerned about the fuel. The driver was concerned about directions. I just got in the car, got to my destination, and I only paid for that car during the time I was actually traveling. So why did I give you this wonderful monologue about the decision I made when coming to EuroPython? The reason is because you can think of this in your different options for how you host your code and how you can run your code. So if I have a Python application that I want to run, I could go build or maintain my own servers. I could get virtual servers in the Cloud. Maybe I actually use my own hardware. It's totally feasible. It's something I could do, but there's a lot of things that now I need to manage and maintain. I need to make sure that those operating systems are up to date. I need to make sure that my machines have power. If I get a big load of traffic, I need to make sure that I have enough capacity. Those are all things that now I need to be aware of in managing. Now, there's also these platform as a service offerings, whether it's in Azure or an AWS or Red Hat or Pivotal. These are nice. This makes it so I'm not often managing the underlying machines, but I still am in charge of a few things. I need to make sure that it's scaled appropriately. I need to make sure that I'm following the kind of constraints of that platform service and very likely I'm paying a fixed cost whether my code is actually running or not. Now, serverless to me is very much like this rideshare world. In serverless, all you care about is your code. You write your code, you attach it to the event that you care about, and you publish that to the Cloud. Every other aspect of that application, how it scales, how highly available it is, the security of the operating system, all of those aspects that frankly aren't that much fun to deal with, get managed by the Cloud provider for you. The reason that this is appealing to a growing number of developers and teams is because it allows me to focus on solving the problems that I want to solve. Some of those other aspects that still need to be solved, maybe I'm okay not being the person who's managing that. For Azure Function specifically, we have a few languages available today as we start talking about Azure Functions.net, Node, which includes JavaScript and TypeScript, Java, Python is in preview today, but I'm really excited we're actually rolling out the general available update for Python in this next week. So very shortly, if you keep an eye on blogs, Python will be generally available in a few short weeks, and as well PowerShell as a language. Azure Functions itself is completely open source, so not included on this slide are some community contributed languages like Go and Rust. When we double click on Python specifically, there's a few key points that I want to call out here. After this slide, I'm actually going to work through, and we're going to build a Python Azure Function together, so you can actually see the experience. A few things the first, Azure Functions is entirely open sourced. You can see all of the code for every tool, the runtime, the Python, all of that is on GitHub, and we love contributions from the community, so feel free to get involved. One of the awesome things about Azure Functions though, is the rich development experience that you get, and specifically with tools like Visual Studio Code. So we're going to spend our time in Visual Studio Code today, and it gives you things like local debugging, rich intelligence, easy publish to the Cloud. Now, you don't have to use Visual Studio Code. You can use PyCharm, you can use Sublime, you can use any editor you really want. The tools work across all editors, but we have a first-class integration with VS Code. You can trigger your code, and you can say, hey, I want this Python script to run on a number of different event sources. It's going to scale automatically for you, and if your code is never executed, if your code never triggers, you never pay any money. Even when it does trigger, you get like a million executions free every single month. So very often, even when your code does run, you're still not paying us anything, so it's great. You get some rich monitoring capabilities, and you can also set up some rich CI CD, whether you're using Travis, Azure DevOps, or any CI CD tool Jenkins, you name it. So let's go through now that we have an understanding of what serverless is Azure Functions in Python, and we want to build something. What I want to build is a simple function, a simple API that can analyze the sentiment of some text. A very hello world example, and it's going to allow us to walk us through this experience in the tools. So I mentioned we're going to spend most of our time in Visual Studio Code, so that's where I'm at now, an empty editor. I'll call out a few things. There's a few extensions in Visual Studio Code that I'm going to be using to make our life even better. The first is this Azure Functions extension, which gives us some nice Azure Functions tooling. The other one here is the Python extension, which is going to give us some nice language options. I've got a lot of extensions, so I took me a while to get to the piece. Python, obviously all of these with Visual Studio Code are all free and easy to install, but if you want to follow along at home, that's what you would need to do. So now that I have the Azure Functions extension, I can go ahead and click in here to the Azure icon and say, all right, let's create a new function. So I'm going to create a brand new project. We'll get a folder for it. Let's call this one EuroPython. And the first thing it wants to know is what language I want to write this function in. Obviously, we want to do Python, because we believe in the one true language of Python. And I have all of these different event sources. I could make this run every five minutes. I could make it run every Friday at 10 a.m. I could have it trigger on an HTTP request whenever an image gets uploaded to an Azure storage account or a message gets dropped into queue, some data changes in a database. You get the idea. There's a lot of different event sources that can say, hey, go run this script. Now I mentioned we want to write an API for sentiment, so we're going to choose the HTTP trigger. We're going to call this Analyze Sentiment. It's going to be the name of our function. I could require that there's a key and some authentication to invoke this function. In this case, I'm just going to keep it anonymous and we'll open it in the current window. So now the Azure Functions extension in Visual Studio Code is going and scaffolding for me this function project. And it's gone ahead and opened for me now kind of the base template for an HTTP triggered Azure function. So this is all the code that exists in my project. There's some metadata here that tells it what trigger it uses. I also have my requirements.txt file, which is empty right now. But this is the only code that's actually in my whole project. It's very, very lightweight. It looks almost just like a simple script or a console application. But instead of getting passed in like some arguments, some string arguments from the command line, I actually am getting an HTTP request. So when someone triggers this function, it's going to be an HTTP request. And I can now use pieces of that request, whether it's the body query parameters inside my code. Now, the simple template is just a hello world function. It's just going to look to see if you pass in a name, is either a query parameter in the body of the message, and return back a nice and friendly hello, whatever your name was. Now, what I want to show quickly here, before we start analyzing sentiment, is again, one of the nice things with Azure Function is all of the tooling. So I'm going to go ahead here and set a break point. And let's go ahead and say we want to start debugging. And this is going to go ahead and start a debug session here in Visual Studio Code. I didn't have to do a whole lot to do that. I always want to show this flashy ASCII art. Right now, on my MacBook, this could be Windows, it could be Linux, I'm running that open sourced Azure Functions runtime. So this is the same runtime that we'll be executing in the cloud. But in this case, it's actually running on my machine. It's noticed I have this HTTP triggered function. And it's even given us this nice local endpoint that I can use to test. So let's test it out now. Let's go ahead and send a request to this function. So I'm going to go ahead here. I have another very cool Visual Studio extension that actually lets me send HTTP requests when I just annotate them with this cool annotation. So I'm going to say do a post to that URL. And we want the content type to be JSON. And now this awesome Visual Studio Code extension called REST Client. Well, let me send the request right here in the editor. So I'm going to go ahead and send that request. And as soon as I click the Send button, my breakpoint was hit. I'm now debugging this function. As I step through it, I can see that I got my name property. In this case, I left my name as Azure. My name's actually Jeff. But that's fine. You can call me Azure. And when I finish the debug session, I get back my response that says hello, Azure. So that's kind of the basic experience, creating the function, debugging it. The last step that I would do here is publishing. But before we get there, let's actually add in some more complex code. I want to do that sentiment analysis, like I mentioned. And I'm actually going to use a dependency here that maybe some of you have used before called Text Blob, which gives me a bunch of machine learning capabilities to analyze text. Pull out the key phrases, pull out the nouns, pull out the sentiment. And I'm going to replace this kind of basic hello world code. And I'm going to, faster than you could have believed, type in, because I didn't type it in, type in this code to use Text Blob, to look at the text, and pull out the sentiment polarity. Now, you'll see this in a second. But what it's actually going to return back is a number. That number is going to be between negative 1 and 1. The closer to positive 1 is the more positive the sentiment. The closer to negative 1, the more negative the sentiment. Let's go ahead here and make sure I'm importing the right stuff as well. Again, using my amazing typing skills. So at this point, I pretty much have everything I need. I could actually run this right now in debug. And when I go ahead and run it, I could show you now, if I say debug again, the first thing it's going to do is it's going to go ahead and pull in that Text Blob dependency and use it to run for me. So if we now change this, it's now running the same thing. It's now analyzing sentiment. I'll go ahead and change this. I'm not passing in a name anymore. I'm not passing in text. I'm going to say I am so, so happy. Go ahead and save that and click Send. Oh, I left my break point hanging around. That's OK. And you'll see here, now I get a sentiment of 0.8. This was very happy. I could even quickly come in and make this one change to I am so, so sad. And now it's negative 0.5. So my code's working. Now I have a simple Python script. It's going to get an HTTP request. And it's going to tell me the sentiment of whatever the text I passed in. Now the one thing I want to call out, when I use this library, this text blob file locally, how it's actually working is that it installed on my machine. I'll show you this at the home directory. As part of the, what is it, NLTK library, there's these NLTK data models that right now are at my home directory that you can kind of see here. When I publish this function, it's very important that my function has access to these same models. These are the models that my Python function needs. So in order to do that, I just need to make sure that I actually copy these models into my project directory. So now I'm here in the project directory, EuroPython. And I'm just going to copy the models, NLTK data, into the current project. So now those models are available there. And I just need to add one more line. Did my super fast typing not work that time? It did. And this line is just saying, hey, NLTK, you can actually find the models in the current directory. Don't go look at the home directory. So just a pattern that's worth noting. If you're using things like models in your function, you can just include those models in your project directory column directly then. And now when I publish, which is the last step, it's going to take this entire directory, the Python script, the models. It's going to look at the requirements.txt file. And it's going to put them in a zip, send them to Azure. Now one of the new features that we actually are just rolling out now, which I'm going to show you, is that when I choose to publish this, I actually don't need this flag anymore, Text Blob requires some native dependencies. It requires that I have native Linux dependencies when it runs on Linux, when it runs on Max, it's different. When it runs on Windows, it's different still. And rather than making you deal with the complexity of knowing, oh, shoot, I just built this on my Windows or Mac, it's going to be running in a Linux container in the cloud. How do I get the right versions? One of the features that we have now is that when I go ahead and click Publish, and when I say now, I mean rolling out in the next week or two, now for me, because I'm running these bits now. What it should do at first, oh, actually, I need to make sure I've authenticated with my account. I realize I haven't done this yet. Entari's demo, this one will work. What it's going to do is it's going to look at this function that I have, realize that it's a Linux Python function. It's going to archive the directory like I mentioned, but the cool new feature I wanted to call out is that it's actually going to go pull down and do a remote build of any requirements that I've defined in my requirements.txt file. So it's actually going to use the Linux environment in the cloud to pull in the text blob dependency, do all the building there. You can see it's doing the server side build right now. It's uploading my files. All this is done for me. So regardless if I'm developing on Windows, Mac, or Linux, I'm confident knowing that my app's going to run successfully in the cloud using this new server side build tools as part of the Azure Functions experience. Now once it's done, and we don't even have to wait for it fully, it's going to give me back a URL that then anybody could call. It's not a local host URL anymore. It's going to be a.azurewebsites.net URL that anyone could then call, pass in some text, and it's going to give you back a score. So it's that easy to kind of get up and running, include dependencies that you need, include models that you need, and then finally publishing it to the cloud. In this case, I used the command line because I wanted to show off that new functionality. I could have also done the publish directly from right here in Visual Studio Code. So once this is there in the cloud, I actually have one that I published ahead of time because I figured that it would take a little bit to do the publishing and build on the internet connection here. But I do have one that's a.azurewebsites.net URL. And if I go ahead here now and just click the Send Request button, it's going to send the same text off to, in this case, now this cloud hosted function. And now running in the cloud, that same Python code is now available to anyone. Now to kind of bring this home, I want to show you, hopefully you've seen this is a very productive development experience. I can quickly get something like a Python script attached to an HTTP request and running. One of the other benefits here is the scale. The fact that now if everyone in this room tried to call the same API, if everyone in this whole city tried to call the same API, I want to know that it's going to scale and be available to everyone. So to prove this, and for the last five minutes, we're going to attach this to some data. So I'm going to take that same function that I just wrote, the Analyze sentiment. What I actually want to do is I want to populate this real-time dashboard. So this dashboard is empty right now. It's very lonely. This is a product called Microsoft Power BI. And what I actually want to attach it to is I want this to tell me everyone in the world who's tweeting, and I want to know the sentiment of those tweets and where they're tweeting from. And the thing that's going to drive understanding the sentiment is going to be calling that Azure function we just published. Now to attach it to some data, I'm going to use another serverless piece of technology in Azure called Azure Logic Apps. Now Logic Apps is a little bit different than Azure Functions, because in this case, I don't actually create code. With Logic Apps, it's serverless in the same ways that it scales to 0 or scales to n. But here, I actually create workflows, and I can integrate with different services. So I want to connect my Azure function to Twitter, just to show you some of how Azure Logic Apps works. There's actually over 200 out-of-the-box connectors here that you can use in your serverless applications in Azure to connect to services like Twitter. I'm scrolling down. You probably recognize these other ones. Hey, when someone uploads something to Dropbox, when someone adds something to GitHub, Salesforce, SAP on-premises, Dynamics 365, OneDrive, Google Drive, SendGrid, you get the idea. There's a bunch of services here. This is all function code that I don't have to write, because when I want to integrate with Twitter, I can just say, hey, let me integrate with Twitter. In this case, I want to trigger this whenever a new tweet is posted. And I want to listen for a trending topic. I look today. EuroPython is trending locally, but there are a bunch of tweets globally around Spider-Man, because the new Spider-Man movie's been coming out. So I can now trigger whenever someone tweets about Spider-Man, check Twitter every 30 seconds. That's fine. And now start to call things like my Azure functions, and say, hey, here's that Azure functions I just wrote, the EuroPython one. And I want you to go ahead and analyze the sentiment of that tweet. Now, for the sake of time, I'm not going to go build this whole thing from scratch and wait for you to watch me fill out the designer. Hopefully you get the idea of how a logic app works. So I actually have a previous version from late last night where I actually built this entire workflow. It's only four steps, nothing too crazy. So I do the same trigger, trigger on Spider-Man. The first thing I'm going to do is I'm going to analyze the sentiment. You'll see here I'm looking at the tweet text as the text that I'm passing into that Azure function that we just published. I'm going to go then categorize this. I have another Azure function that pretty much just gives it a color. If it's positive green, if it's neutral yellow, if it's negative red. And then the last one is I'm going to publish these all to that real-time dashboard that I showed you a second ago. So now let's actually watch these functions scale. As soon as I click Save here, and we'll actually click Run so we can watch it debug, this logic app's now going to start listening to Twitter. And hopefully somebody in the world right now is tweeting about Spider-Man. And if not, someone in the audience could. But I suspect they will. I picked Spider-Man specifically because it's been noisy. And you can see here's an example of one that just got executed. But I guarantee that there's hundreds more that are firing right now while I'm talking. You can see now that someone tweeted far from home spoilers. Whoa, I'm not going to read the rest of that tweet. Apparently there are spoilers in this tweet. But the sentiment of the tweet, I can see it called my function. It got back a score of 0.1 and so forth. So kind of the grand finale in crossing our fingers that this all works. This is where the suspense comes in. We should now see this Power BI dashboard. Hopefully I don't have to click Refresh here. Oh, man, this is the grand finale. This is the part that really has to work. We should see this dashboard here. OK, it's lit up. I just had to click Refresh. So now this is filling up with data. And you can see here there's been a few tweets that have come in. Not very many. Not as many as when I ran this last night. It's a little bit earlier in the US right now where a lot of those tweets were coming from. But at least these five tweets have triggered. I can see the sentiment. They didn't provide a location. They're all yellow with the green circle. That's super intuitive. But if I leave these on or if I keep refreshing, you would be able to see this dashboard just comes to life. So if hundreds of people started tweeting, there's a few more. I see some from Europe. There might even be people in this room. Thank you for your participation if you did. Oh, not that location, though. This isn't streamed, right? But that gives you the idea. So the thing here, I was hoping this would have been a noisier Twitter topic. But the idea here is that if thousands of people were tweeting, that simple function, that 20 line function that we wrote just a few seconds ago, can just automatically scale and be available to all of those requests as they come in. That's really where Azure Functions comes in. I didn't have to think about that. You didn't see me SSH into any servers. You didn't have me configure any knobs of scale settings. I don't have to. I just say, here's my code. Here's the event I want you to trigger on. And then let it go to work. All right, so for next steps, for the last five minutes, there's a few things here. I'd encourage all of you to go give Azure Functions a try. Probably the best place to start is our Quick Start. This is entirely using the command line tools. So it does work with VS Code like I did. But if you're using PyCharm, if you're using Sublime, if you're using whatever other editor, the same Quick Start will work just great for you. And you can get up and running and just run this all locally, even without an Azure account. If you do want an Azure account, I didn't have a link here. You go to azure.com. You can get a massive free credit. I think it's like 200 euros to get started with Azure, though Azure Functions is pretty much free for most everyone because of the million executions a month you get for free. We also have a video that walks through building an app similar to this one, just a different scenario. One of the things I wanted to mention is there's serverlesslibrary.net. This is a website that has a bunch of samples of different functions that people have written. So if I come here and I say, hey, I want to look at Python samples, these come from customers, these come from developers on our team. You can see here there's stuff with like, hey, a Python one that does some serverless IoT. I know there's some here about data cleaning. One of our customers built a data cleaning pipeline using ML and Python. I could click in here, edit it directly in Visual Studio Code, or browse to the code on GitHub to give me some samples as I get started and learning about what I can do with functions. If you're interested in the code I used with TextBlog, I posted that on my own GitHub account. And then finally, if you haven't stopped by the Microsoft booth already, please stop by. We've got awesome socks. We have many members from both the Azure Functions team, the Visual Studio Code team, Jupyter Notebooks. We're more than happy to help you come talk to us, get some swag, get some of those socks and stickers. And if you're interested specifically on Azure Functions and serverless, we have a Twitter handle on the Azure Functions account, as well as my own personal one. So hopefully you've understood, and this gives you an idea of what Azure Functions are, how easy they are for you to get started with, and how you could start to take advantage of not having to worry about all those complex pieces of hosting an application, and just get started with the code that you want, all using a fully open tool set in Azure Functions. So thank you all very much. It's been awesome being with you all here today. Thank you, Jeff. And great talk. So any questions? We have some time. Please come to the microphones. Thanks, Jeff. Quick question. If I wanted to dockerize a number of small flash gaps and bang them up on functions, so I don't have to worry about them, can I do that now? Is it viable for production? Yes, so I actually was debating whether I was going to show this or not as I looked in the... And if I heard you're right, you want to dockerize the functions correctly. So one of the benefits about Azure Functions being open source and our kind of engagement with the open source community is to actually just come back into this existing project. I'm not going to change anything. This is the one we wrote from scratch, but I'm just going to write this command to initialize a docker file. Now automatically, without me even having to do the work, this tool looked at the project, and it's actually generated for me here a valid docker file that will run Python functions in any environment that I want to run them in. Now I could even publish these containers to Azure and have them run, because sometimes I might want to say, like, hey, I actually want to customize the environment. I want to install whatever some package that might not be included in our image. You can do that here and publish it. But the other one that we're seeing increasing interest in is that I could dockerize this and run it maybe on premises. In fact, recently we've announced a project in partnership with Red Hat called Kata, which will give you serverless scaling, serverless event-driven scaling, for containers running in Kubernetes. And Kata works natively with Azure functions and containers just like this one. So if I wanted to run functions in a container, maybe as part of a Kubernetes microservices in the cloud or on premises, maybe an open shift, using a combination of this docker file and things like Kata, I can get the same serverless scale experience in a production ready way right now. So definitely something that we've provided, actually first-class tooling support for those docker scenarios and something that we hope many of you take advantage of. So great question. All right, I think we have time for one more. Yeah. Yeah. Hi, thanks for the demo. I was wondering why is my Uber only allowed to rise for 10 minutes? Yes, you get kicked out of your Uber after 10 minutes in the function world. Yes, so Azure functions, we have a few pricing models. The first one is the consumption one. That's what is published to you by default. It scales to zero, it can scale up to whatever. And there is a 10-minute execution limit. That's there mostly because of how the consumption plan works where recycling machines very often. That's as much as we can kind of guarantee without us worrying that we're gonna reboot it. That said, though, we actually do have an option which is getting Python support actually next week called the premium plan. And the premium plan has the same serverless scale. It's a little bit more expensive as the name would make you believe it's premium. But one of the features you get from it is you can actually have unbounded, I was making my hands very big, unbounded executions. So you could have executions that last for six hours, eight hours. In the premium plan is the only place where we're not going to guarantee we're gonna recycle these VMs super often. So that's the model today. Though it's a common request, so feel free to keep giving us feedback as well. But it is an option, you just have to choose a different hosting plan. Great. Okay, so I think that's all the time. I wanna make sure that there's time for the next speaker to come up because there's an awesome keynote, I believe, about public speaking. So a very good topic as well. So with that, thank you all again very much. It's been awesome. Thank you. Thank you. Thank you all so much.
 All right, welcome everyone.  We have 30 minutes.  There's a bunch that I want to cover today.  So first off, as was mentioned, I'm Jeff Holland.  I am a program manager.  I work in the engineering team out of Seattle.  So I was very excited for the chance to travel out here with  a few members from our team as well and talk to you  today about Python and specifically with Azure Serverless.  Now before we start,  just to get a feel for the room,  how many of you here have already used  Serverless in some form or fashion?  That's AWS Lambda, Azure Functions, Google Cloud Functions.  Great, so about 20 percent.  Then of those, how many of you has  used Azure Functions specifically?  Very few. Great.  So everyone will learn something today.  Let's get started then.  So for those who maybe didn't raise their hand,  before I even start,  I want to set some context.  Like what is Serverless?  What is with all of the people talking about Serverless?  How much is hype?  How much is just vapor?  To explain how I think about Serverless,  I wanted to use this analogy.  That's how did I get here today or how did any of you get here today?  Specifically, this one,  the public transportation in Switzerland is a little bit  better than when I give this talk  elsewhere in maybe the United States.  But for me, I landed at the airport yesterday morning,  and I had a problem to solve.  How do I get from the airport to the Congress Center?  There was one option.  I'm only going to be here for a few days.  I could have bought a car.  I could have walked from the airport to a car dealership.  I assume there's one close.  I could have picked out a car,  put down whatever a couple of thousand euros,  registered that car with the government.  I assume that on an American passport,  I could buy a car, I don't even know, pay taxes.  There's a lot that that would involve.  I would now be maintaining that car.  I would need to make sure that it had fuel.  I'd need to navigate to the Congress Center.  Now I own this massive asset of a car for my trip to  Switzerland might be a little bit overkill.  So the other option that's pretty popular is maybe I could just rent a car.  Rather than just purchase one outright,  maybe I walk down to the car rental like Avis or something and I say,  hey, I'm going to be here for four days.  Can I have a car for four days?  Like sure, here's the keys, you're going to pay 50 euros a day in this car is yours.  So now it's a lot easier to buy a car.  I don't have to worry about changing the oil.  I don't have to worry about paying taxes or registering the vehicle.  Now the only things I have to care about are making sure that it has fuel.  I still have to look up directions to the Congress Center.  For times like right now where I'm not driving,  I'm actually in front of all of you talking,  I'm still paying for my rental car.  Whether I'm using it or not,  I'm still paying that daily rate.  So the last option, which is actually what I'd use whenever I travel, is ride share.  This is the ability so that I really go to the airport.  I opened up the Uber app.  I said, hey, I need to get from the airport to the Congress Center.  Immediately a car pulled up.  They said, hey, Jeff, come on in.  I jumped in the backseat.  Payment was taken care of.  I didn't ever think about directions.  I couldn't tell you how I got here.  It just happened.  The driver was concerned about the fuel.  The driver was concerned about directions.  I just got in the car,  got to my destination,  and I only paid for that car during the time I was actually traveling.  So why did I give you this wonderful monologue about  the decision I made when coming to EuroPython?  The reason is because you can think of this in your different options for how you  host your code and how you can run your code.  So if I have a Python application that I want to run,  I could go build or maintain my own servers.  I could get virtual servers in the Cloud.  Maybe I actually use my own hardware.  It's totally feasible.  It's something I could do,  but there's a lot of things that now I need to manage and maintain.  I need to make sure that those operating systems are up to date.  I need to make sure that my machines have power.  If I get a big load of traffic,  I need to make sure that I have enough capacity.  Those are all things that now I need to be aware of in managing.  Now, there's also these platform as a service offerings,  whether it's in Azure or an AWS or Red Hat or Pivotal.  These are nice.  This makes it so I'm not often managing the underlying machines,  but I still am in charge of a few things.  I need to make sure that it's scaled appropriately.  I need to make sure that I'm following the kind of  constraints of that platform service and very likely I'm  paying a fixed cost whether my code is actually running or not.  Now, serverless to me is very much like this rideshare world.  In serverless, all you care about is your code.  You write your code,  you attach it to the event that you care about,  and you publish that to the Cloud.  Every other aspect of that application,  how it scales, how highly available it is,  the security of the operating system,  all of those aspects that frankly aren't that much fun to deal with,  get managed by the Cloud provider for you.  The reason that this is appealing to  a growing number of developers and teams is because it allows me to focus  on solving the problems that I want to solve.  Some of those other aspects that still need to be solved,  maybe I'm okay not being the person who's managing that.  For Azure Function specifically,  we have a few languages available today as we start talking about Azure Functions.net,  Node, which includes JavaScript and TypeScript,  Java, Python is in preview today,  but I'm really excited we're actually rolling out  the general available update for Python in this next week.  So very shortly, if you keep an eye on blogs,  Python will be generally available in a few short weeks,  and as well PowerShell as a language.  Azure Functions itself is completely open source,  so not included on this slide are  some community contributed languages like Go and Rust.  When we double click on Python specifically,  there's a few key points that I want to call out here.  After this slide, I'm actually going to work through,  and we're going to build a Python Azure Function together,  so you can actually see the experience.  A few things the first,  Azure Functions is entirely open sourced.  You can see all of the code for every tool,  the runtime, the Python,  all of that is on GitHub,  and we love contributions from the community,  so feel free to get involved.  One of the awesome things about Azure Functions though,  is the rich development experience that you get,  and specifically with tools like Visual Studio Code.  So we're going to spend our time in Visual Studio Code today,  and it gives you things like local debugging,  rich intelligence, easy publish to the Cloud.  Now, you don't have to use Visual Studio Code.  You can use PyCharm, you can use Sublime,  you can use any editor you really want.  The tools work across all editors,  but we have a first-class integration with VS Code.  You can trigger your code,  and you can say, hey, I want this Python script to run  on a number of different event sources.  It's going to scale automatically for you,  and if your code is never executed,  if your code never triggers, you never pay any money.  Even when it does trigger,  you get like a million executions free every single month.  So very often, even when your code does run,  you're still not paying us anything, so it's great.  You get some rich monitoring capabilities,  and you can also set up some rich CI CD,  whether you're using Travis,  Azure DevOps, or any CI CD tool Jenkins, you name it.  So let's go through now that we have an understanding  of what serverless is Azure Functions in Python,  and we want to build something.  What I want to build is a simple function,  a simple API that can analyze the sentiment of some text.  A very hello world example,  and it's going to allow us to walk us through  this experience in the tools.  So I mentioned we're going to spend most of our time  in Visual Studio Code,  so that's where I'm at now, an empty editor.  I'll call out a few things.  There's a few extensions in Visual Studio Code  that I'm going to be using to make our life even better.  The first is this Azure Functions extension,  which gives us some nice Azure Functions tooling.  The other one here is the Python extension,  which is going to give us some nice language options.  I've got a lot of extensions,  so I took me a while to get to the piece.  Python, obviously all of these with Visual Studio Code  are all free and easy to install,  but if you want to follow along at home,  that's what you would need to do.  So now that I have the Azure Functions extension,  I can go ahead and click in here to the Azure icon and say,  all right, let's create a new function.  So I'm going to create a brand new project.  We'll get a folder for it.  Let's call this one EuroPython.  And the first thing it wants to know is what language  I want to write this function in.  Obviously, we want to do Python,  because we believe in the one true language of Python.  And I have all of these different event sources.  I could make this run every five minutes.  I could make it run every Friday at 10 a.m.  I could have it trigger on an HTTP request  whenever an image gets uploaded to an Azure storage account  or a message gets dropped into queue,  some data changes in a database.  You get the idea.  There's a lot of different event sources that can say,  hey, go run this script.  Now I mentioned we want to write an API for sentiment,  so we're going to choose the HTTP trigger.  We're going to call this Analyze Sentiment.  It's going to be the name of our function.  I could require that there's a key  and some authentication to invoke this function.  In this case, I'm just going to keep it anonymous  and we'll open it in the current window.  So now the Azure Functions extension  in Visual Studio Code is going and scaffolding for me  this function project.  And it's gone ahead and opened for me now  kind of the base template for an HTTP triggered  Azure function.  So this is all the code that exists in my project.  There's some metadata here that tells it what trigger it uses.  I also have my requirements.txt file,  which is empty right now.  But this is the only code that's actually in my whole project.  It's very, very lightweight.  It looks almost just like a simple script or a console  application.  But instead of getting passed in like some arguments,  some string arguments from the command line,  I actually am getting an HTTP request.  So when someone triggers this function,  it's going to be an HTTP request.  And I can now use pieces of that request,  whether it's the body query parameters inside my code.  Now, the simple template is just a hello world function.  It's just going to look to see if you pass in a name,  is either a query parameter in the body of the message,  and return back a nice and friendly hello,  whatever your name was.  Now, what I want to show quickly here,  before we start analyzing sentiment,  is again, one of the nice things with Azure Function  is all of the tooling.  So I'm going to go ahead here and set a break point.  And let's go ahead and say we want to start debugging.  And this is going to go ahead and start a debug session  here in Visual Studio Code.  I didn't have to do a whole lot to do that.  I always want to show this flashy ASCII art.  Right now, on my MacBook, this could be Windows,  it could be Linux, I'm running that open sourced Azure Functions  runtime.  So this is the same runtime that we'll  be executing in the cloud.  But in this case, it's actually running on my machine.  It's noticed I have this HTTP triggered function.  And it's even given us this nice local endpoint  that I can use to test.  So let's test it out now.  Let's go ahead and send a request to this function.  So I'm going to go ahead here.  I have another very cool Visual Studio extension  that actually lets me send HTTP requests when I just  annotate them with this cool annotation.  So I'm going to say do a post to that URL.  And we want the content type to be JSON.  And now this awesome Visual Studio Code extension  called REST Client.  Well, let me send the request right here in the editor.  So I'm going to go ahead and send that request.  And as soon as I click the Send button,  my breakpoint was hit.  I'm now debugging this function.  As I step through it, I can see that I got my name property.  In this case, I left my name as Azure.  My name's actually Jeff.  But that's fine.  You can call me Azure.  And when I finish the debug session,  I get back my response that says hello, Azure.  So that's kind of the basic experience,  creating the function, debugging it.  The last step that I would do here is publishing.  But before we get there, let's actually add in some more  complex code.  I want to do that sentiment analysis, like I mentioned.  And I'm actually going to use a dependency here that maybe some  of you have used before called Text Blob, which gives me  a bunch of machine learning capabilities to analyze text.  Pull out the key phrases, pull out the nouns,  pull out the sentiment.  And I'm going to replace this kind of basic hello world code.  And I'm going to, faster than you could have believed,  type in, because I didn't type it in, type in this code  to use Text Blob, to look at the text,  and pull out the sentiment polarity.  Now, you'll see this in a second.  But what it's actually going to return back is a number.  That number is going to be between negative 1 and 1.  The closer to positive 1 is the more positive the sentiment.  The closer to negative 1, the more negative the sentiment.  Let's go ahead here and make sure I'm importing the right stuff  as well.  Again, using my amazing typing skills.  So at this point, I pretty much have everything I need.  I could actually run this right now in debug.  And when I go ahead and run it, I could show you now,  if I say debug again, the first thing it's going to do  is it's going to go ahead and pull in that Text Blob dependency  and use it to run for me.  So if we now change this, it's now running the same thing.  It's now analyzing sentiment.  I'll go ahead and change this.  I'm not passing in a name anymore.  I'm not passing in text.  I'm going to say I am so, so happy.  Go ahead and save that and click Send.  Oh, I left my break point hanging around.  That's OK.  And you'll see here, now I get a sentiment of 0.8.  This was very happy.  I could even quickly come in and make this one change to I  am so, so sad.  And now it's negative 0.5.  So my code's working.  Now I have a simple Python script.  It's going to get an HTTP request.  And it's going to tell me the sentiment of whatever  the text I passed in.  Now the one thing I want to call out,  when I use this library, this text blob file locally,  how it's actually working is that it  installed on my machine.  I'll show you this at the home directory.  As part of the, what is it, NLTK library,  there's these NLTK data models that right now are at my home  directory that you can kind of see here.  When I publish this function, it's  very important that my function has access  to these same models.  These are the models that my Python function needs.  So in order to do that, I just need  to make sure that I actually copy these models  into my project directory.  So now I'm here in the project directory, EuroPython.  And I'm just going to copy the models, NLTK data,  into the current project.  So now those models are available there.  And I just need to add one more line.  Did my super fast typing not work that time?  It did.  And this line is just saying, hey, NLTK,  you can actually find the models in the current directory.  Don't go look at the home directory.  So just a pattern that's worth noting.  If you're using things like models in your function,  you can just include those models in your project directory  column directly then.  And now when I publish, which is the last step,  it's going to take this entire directory, the Python script,  the models.  It's going to look at the requirements.txt file.  And it's going to put them in a zip, send them to Azure.  Now one of the new features that we actually  are just rolling out now, which I'm going to show you,  is that when I choose to publish this,  I actually don't need this flag anymore,  Text Blob requires some native dependencies.  It requires that I have native Linux dependencies when  it runs on Linux, when it runs on Max, it's different.  When it runs on Windows, it's different still.  And rather than making you deal with the complexity of knowing,  oh, shoot, I just built this on my Windows or Mac,  it's going to be running in a Linux container in the cloud.  How do I get the right versions?  One of the features that we have now  is that when I go ahead and click Publish,  and when I say now, I mean rolling out in the next week  or two, now for me, because I'm running these bits now.  What it should do at first, oh, actually, I  need to make sure I've authenticated with my account.  I realize I haven't done this yet.  Entari's demo, this one will work.  What it's going to do is it's going to look at this function  that I have, realize that it's a Linux Python function.  It's going to archive the directory like I mentioned,  but the cool new feature I wanted to call out  is that it's actually going to go pull down and do  a remote build of any requirements that I've  defined in my requirements.txt file.  So it's actually going to use the Linux environment  in the cloud to pull in the text blob dependency,  do all the building there.  You can see it's doing the server side build right now.  It's uploading my files.  All this is done for me.  So regardless if I'm developing on Windows, Mac, or Linux,  I'm confident knowing that my app's  going to run successfully in the cloud  using this new server side build tools  as part of the Azure Functions experience.  Now once it's done, and we don't even have to wait for it fully,  it's going to give me back a URL that then anybody could call.  It's not a local host URL anymore.  It's going to be a.azurewebsites.net URL  that anyone could then call, pass in some text,  and it's going to give you back a score.  So it's that easy to kind of get up and running,  include dependencies that you need,  include models that you need, and then finally publishing it  to the cloud.  In this case, I used the command line  because I wanted to show off that new functionality.  I could have also done the publish directly from right  here in Visual Studio Code.  So once this is there in the cloud,  I actually have one that I published ahead of time  because I figured that it would take a little bit to do  the publishing and build on the internet connection here.  But I do have one that's a.azurewebsites.net URL.  And if I go ahead here now and just click the Send Request  button, it's going to send the same text off to, in this case,  now this cloud hosted function.  And now running in the cloud, that same Python code  is now available to anyone.  Now to kind of bring this home, I want to show you,  hopefully you've seen this is a very productive development  experience.  I can quickly get something like a Python script attached  to an HTTP request and running.  One of the other benefits here is the scale.  The fact that now if everyone in this room  tried to call the same API, if everyone in this whole city  tried to call the same API, I want  to know that it's going to scale and be available to everyone.  So to prove this, and for the last five minutes,  we're going to attach this to some data.  So I'm going to take that same function that I just wrote,  the Analyze sentiment.  What I actually want to do is I want  to populate this real-time dashboard.  So this dashboard is empty right now.  It's very lonely.  This is a product called Microsoft Power BI.  And what I actually want to attach it to  is I want this to tell me everyone in the world who's  tweeting, and I want to know the sentiment of those tweets  and where they're tweeting from.  And the thing that's going to drive understanding the sentiment  is going to be calling that Azure function we just published.  Now to attach it to some data, I'm  going to use another serverless piece of technology in Azure  called Azure Logic Apps.  Now Logic Apps is a little bit different than Azure Functions,  because in this case, I don't actually create code.  With Logic Apps, it's serverless in the same ways  that it scales to 0 or scales to n.  But here, I actually create workflows,  and I can integrate with different services.  So I want to connect my Azure function to Twitter,  just to show you some of how Azure Logic Apps works.  There's actually over 200 out-of-the-box connectors  here that you can use in your serverless applications  in Azure to connect to services like Twitter.  I'm scrolling down.  You probably recognize these other ones.  Hey, when someone uploads something to Dropbox,  when someone adds something to GitHub, Salesforce, SAP  on-premises, Dynamics 365, OneDrive, Google Drive, SendGrid,  you get the idea.  There's a bunch of services here.  This is all function code that I don't have to write,  because when I want to integrate with Twitter,  I can just say, hey, let me integrate with Twitter.  In this case, I want to trigger this whenever  a new tweet is posted.  And I want to listen for a trending topic.  I look today.  EuroPython is trending locally, but there  are a bunch of tweets globally around Spider-Man,  because the new Spider-Man movie's been coming out.  So I can now trigger whenever someone tweets about Spider-Man,  check Twitter every 30 seconds.  That's fine.  And now start to call things like my Azure functions,  and say, hey, here's that Azure functions I just wrote,  the EuroPython one.  And I want you to go ahead and analyze the sentiment  of that tweet.  Now, for the sake of time, I'm not  going to go build this whole thing from scratch  and wait for you to watch me fill out the designer.  Hopefully you get the idea of how a logic app works.  So I actually have a previous version from late last night  where I actually built this entire workflow.  It's only four steps, nothing too crazy.  So I do the same trigger, trigger on Spider-Man.  The first thing I'm going to do is  I'm going to analyze the sentiment.  You'll see here I'm looking at the tweet text  as the text that I'm passing into that Azure function  that we just published.  I'm going to go then categorize this.  I have another Azure function that pretty much just  gives it a color.  If it's positive green, if it's neutral yellow,  if it's negative red.  And then the last one is I'm going  to publish these all to that real-time dashboard  that I showed you a second ago.  So now let's actually watch these functions scale.  As soon as I click Save here, and we'll actually click Run  so we can watch it debug, this logic app's now  going to start listening to Twitter.  And hopefully somebody in the world right now  is tweeting about Spider-Man.  And if not, someone in the audience could.  But I suspect they will.  I picked Spider-Man specifically because it's been noisy.  And you can see here's an example of one that just got  executed.  But I guarantee that there's hundreds more  that are firing right now while I'm talking.  You can see now that someone tweeted far from home spoilers.  Whoa, I'm not going to read the rest of that tweet.  Apparently there are spoilers in this tweet.  But the sentiment of the tweet, I can see it called my function.  It got back a score of 0.1 and so forth.  So kind of the grand finale in crossing our fingers  that this all works.  This is where the suspense comes in.  We should now see this Power BI dashboard.  Hopefully I don't have to click Refresh here.  Oh, man, this is the grand finale.  This is the part that really has to work.  We should see this dashboard here.  OK, it's lit up.  I just had to click Refresh.  So now this is filling up with data.  And you can see here there's been a few tweets that have come in.  Not very many.  Not as many as when I ran this last night.  It's a little bit earlier in the US  right now where a lot of those tweets were coming from.  But at least these five tweets have triggered.  I can see the sentiment.  They didn't provide a location.  They're all yellow with the green circle.  That's super intuitive.  But if I leave these on or if I keep refreshing,  you would be able to see this dashboard just comes to life.  So if hundreds of people started tweeting,  there's a few more.  I see some from Europe.  There might even be people in this room.  Thank you for your participation if you did.  Oh, not that location, though.  This isn't streamed, right?  But that gives you the idea.  So the thing here, I was hoping this would have been a noisier  Twitter topic.  But the idea here is that if thousands of people were tweeting,  that simple function, that 20 line function that we wrote  just a few seconds ago, can just automatically scale and be  available to all of those requests as they come in.  That's really where Azure Functions comes in.  I didn't have to think about that.  You didn't see me SSH into any servers.  You didn't have me configure any knobs of scale settings.  I don't have to.  I just say, here's my code.  Here's the event I want you to trigger on.  And then let it go to work.  All right, so for next steps, for the last five minutes,  there's a few things here.  I'd encourage all of you to go give Azure Functions a try.  Probably the best place to start is our Quick Start.  This is entirely using the command line tools.  So it does work with VS Code like I did.  But if you're using PyCharm, if you're using Sublime,  if you're using whatever other editor,  the same Quick Start will work just great for you.  And you can get up and running and just run this all locally,  even without an Azure account.  If you do want an Azure account, I didn't have a link here.  You go to azure.com.  You can get a massive free credit.  I think it's like 200 euros to get started with Azure,  though Azure Functions is pretty much free for most everyone  because of the million executions a month you get for free.  We also have a video that walks through building an app  similar to this one, just a different scenario.  One of the things I wanted to mention is there's  serverlesslibrary.net.  This is a website that has a bunch of samples  of different functions that people have written.  So if I come here and I say, hey,  I want to look at Python samples, these come from customers,  these come from developers on our team.  You can see here there's stuff with like, hey,  a Python one that does some serverless IoT.  I know there's some here about data cleaning.  One of our customers built a data cleaning pipeline  using ML and Python.  I could click in here, edit it directly in Visual Studio Code,  or browse to the code on GitHub to give me some samples  as I get started and learning about what I can do with functions.  If you're interested in the code I used with TextBlog,  I posted that on my own GitHub account.  And then finally, if you haven't stopped  by the Microsoft booth already, please stop by.  We've got awesome socks.  We have many members from both the Azure Functions team,  the Visual Studio Code team, Jupyter Notebooks.  We're more than happy to help you come talk to us,  get some swag, get some of those socks and stickers.  And if you're interested specifically  on Azure Functions and serverless,  we have a Twitter handle on the Azure Functions account,  as well as my own personal one.  So hopefully you've understood, and this gives you an idea  of what Azure Functions are,  how easy they are for you to get started with,  and how you could start to take advantage  of not having to worry about all those complex pieces  of hosting an application,  and just get started with the code that you want,  all using a fully open tool set in Azure Functions.  So thank you all very much.  It's been awesome being with you all here today.  Thank you, Jeff.  And great talk.  So any questions?  We have some time.  Please come to the microphones.  Thanks, Jeff.  Quick question.  If I wanted to dockerize a number of small flash gaps  and bang them up on functions,  so I don't have to worry about them, can I do that now?  Is it viable for production?  Yes, so I actually was debating  whether I was going to show this or not as I looked in the...  And if I heard you're right,  you want to dockerize the functions correctly.  So one of the benefits about Azure Functions  being open source and our kind of engagement  with the open source community  is to actually just come back into this existing project.  I'm not going to change anything.  This is the one we wrote from scratch,  but I'm just going to write this command  to initialize a docker file.  Now automatically, without me even having to do the work,  this tool looked at the project,  and it's actually generated for me here a valid docker file  that will run Python functions  in any environment that I want to run them in.  Now I could even publish these containers to Azure  and have them run,  because sometimes I might want to say,  like, hey, I actually want to customize the environment.  I want to install whatever some package  that might not be included in our image.  You can do that here and publish it.  But the other one that we're seeing increasing interest in  is that I could dockerize this and run it maybe on premises.  In fact, recently we've announced a project  in partnership with Red Hat called Kata,  which will give you serverless scaling,  serverless event-driven scaling,  for containers running in Kubernetes.  And Kata works natively with Azure functions  and containers just like this one.  So if I wanted to run functions in a container,  maybe as part of a Kubernetes microservices  in the cloud or on premises, maybe an open shift,  using a combination of this docker file and things like Kata,  I can get the same serverless scale experience  in a production ready way right now.  So definitely something that we've provided,  actually first-class tooling support  for those docker scenarios  and something that we hope many of you take advantage of.  So great question.  All right, I think we have time for one more.  Yeah.  Yeah.  Hi, thanks for the demo.  I was wondering why is my Uber only allowed  to rise for 10 minutes?  Yes, you get kicked out of your Uber  after 10 minutes in the function world.  Yes, so Azure functions, we have a few pricing models.  The first one is the consumption one.  That's what is published to you by default.  It scales to zero, it can scale up to whatever.  And there is a 10-minute execution limit.  That's there mostly because of how the consumption plan works  where recycling machines very often.  That's as much as we can kind of guarantee  without us worrying that we're gonna reboot it.  That said, though, we actually do have an option  which is getting Python support actually next week  called the premium plan.  And the premium plan has the same serverless scale.  It's a little bit more expensive  as the name would make you believe it's premium.  But one of the features you get from it  is you can actually have unbounded,  I was making my hands very big, unbounded executions.  So you could have executions that last for six hours,  eight hours.  In the premium plan is the only place  where we're not going to guarantee  we're gonna recycle these VMs super often.  So that's the model today.  Though it's a common request,  so feel free to keep giving us feedback as well.  But it is an option, you just have to choose  a different hosting plan.  Great.  Okay, so I think that's all the time.  I wanna make sure that there's time  for the next speaker to come up  because there's an awesome keynote,  I believe, about public speaking.  So a very good topic as well.  So with that, thank you all again very much.  It's been awesome.  Thank you.  Thank you.  Thank you all so much.
Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_0_203.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_204_1187.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_1188_1283.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_1284_11267.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_11268_11759.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_11760_13991.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_13992_14123.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_14124_14483.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_14484_28247.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_28248_28667.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_28668_29999.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_30000_30551.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_30552_31991.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_31992_32051.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_32052_33683.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_33684_35423.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_35424_35879.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_35880_37307.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_37308_39239.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_39240_39707.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_39708_39767.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_39768_40103.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_40104_40823.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_40824_42635.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_42636_43859.png Jeff_Hollan_-_Deploy_Python_to_the_cloud_faster_with_Azure_Serverl_43860_44727.png
All right, welcome everyone. We have 30 minutes. There's a bunch that I want to cover today. So first off, as was mentioned, I'm Jeff Holland. I am a program manager. I work in the engineering team out of Seattle. So I was very excited for the chance to travel out here with a few members from our team as well and talk to you today about Python and specifically with Azure Serverless. Now before we start, just to get a feel for the room, how many of you here have already used Serverless in some form or fashion? That's AWS Lambda, Azure Functions, Google Cloud Functions. Great, so about 20 percent. Then of those, how many of you has used Azure Functions specifically? Very few. Great. So everyone will learn something today. Let's get started then. So for those who maybe didn't raise their hand, before I even start, I want to set some context. Like what is Serverless? What is with all of the people talking about Serverless? How much is hype? How much is just vapor? To explain how I think about Serverless, I wanted to use this analogy. That's how did I get here today or how did any of you get here today? Specifically, this one, the public transportation in Switzerland is a little bit better than when I give this talk elsewhere in maybe the United States. But for me, I landed at the airport yesterday morning, and I had a problem to solve. How do I get from the airport to the Congress Center? There was one option. I'm only going to be here for a few days. I could have bought a car. I could have walked from the airport to a car dealership. I assume there's one close. I could have picked out a car, put down whatever a couple of thousand euros, registered that car with the government. I assume that on an American passport, I could buy a car, I don't even know, pay taxes. There's a lot that that would involve. I would now be maintaining that car. I would need to make sure that it had fuel. I'd need to navigate to the Congress Center. Now I own this massive asset of a car for my trip to Switzerland might be a little bit overkill. So the other option that's pretty popular is maybe I could just rent a car. Rather than just purchase one outright, maybe I walk down to the car rental like Avis or something and I say, hey, I'm going to be here for four days. Can I have a car for four days? Like sure, here's the keys, you're going to pay 50 euros a day in this car is yours. So now it's a lot easier to buy a car. I don't have to worry about changing the oil. I don't have to worry about paying taxes or registering the vehicle. Now the only things I have to care about are making sure that it has fuel. I still have to look up directions to the Congress Center. For times like right now where I'm not driving, I'm actually in front of all of you talking, I'm still paying for my rental car. Whether I'm using it or not, I'm still paying that daily rate. So the last option, which is actually what I'd use whenever I travel, is ride share. This is the ability so that I really go to the airport. I opened up the Uber app. I said, hey, I need to get from the airport to the Congress Center. Immediately a car pulled up. They said, hey, Jeff, come on in. I jumped in the backseat. Payment was taken care of. I didn't ever think about directions. I couldn't tell you how I got here. It just happened. The driver was concerned about the fuel. The driver was concerned about directions. I just got in the car, got to my destination, and I only paid for that car during the time I was actually traveling. So why did I give you this wonderful monologue about the decision I made when coming to EuroPython? The reason is because you can think of this in your different options for how you host your code and how you can run your code. So if I have a Python application that I want to run, I could go build or maintain my own servers. I could get virtual servers in the Cloud. Maybe I actually use my own hardware. It's totally feasible. It's something I could do, but there's a lot of things that now I need to manage and maintain. I need to make sure that those operating systems are up to date. I need to make sure that my machines have power. If I get a big load of traffic, I need to make sure that I have enough capacity. Those are all things that now I need to be aware of in managing. Now, there's also these platform as a service offerings, whether it's in Azure or an AWS or Red Hat or Pivotal. These are nice. This makes it so I'm not often managing the underlying machines, but I still am in charge of a few things. I need to make sure that it's scaled appropriately. I need to make sure that I'm following the kind of constraints of that platform service and very likely I'm paying a fixed cost whether my code is actually running or not. Now, serverless to me is very much like this rideshare world. In serverless, all you care about is your code. You write your code, you attach it to the event that you care about, and you publish that to the Cloud. Every other aspect of that application, how it scales, how highly available it is, the security of the operating system, all of those aspects that frankly aren't that much fun to deal with, get managed by the Cloud provider for you. The reason that this is appealing to a growing number of developers and teams is because it allows me to focus on solving the problems that I want to solve. Some of those other aspects that still need to be solved, maybe I'm okay not being the person who's managing that. For Azure Function specifically, we have a few languages available today as we start talking about Azure Functions.net, Node, which includes JavaScript and TypeScript, Java, Python is in preview today, but I'm really excited we're actually rolling out the general available update for Python in this next week. So very shortly, if you keep an eye on blogs, Python will be generally available in a few short weeks, and as well PowerShell as a language. Azure Functions itself is completely open source, so not included on this slide are some community contributed languages like Go and Rust. When we double click on Python specifically, there's a few key points that I want to call out here. After this slide, I'm actually going to work through, and we're going to build a Python Azure Function together, so you can actually see the experience. A few things the first, Azure Functions is entirely open sourced. You can see all of the code for every tool, the runtime, the Python, all of that is on GitHub, and we love contributions from the community, so feel free to get involved. One of the awesome things about Azure Functions though, is the rich development experience that you get, and specifically with tools like Visual Studio Code. So we're going to spend our time in Visual Studio Code today, and it gives you things like local debugging, rich intelligence, easy publish to the Cloud. Now, you don't have to use Visual Studio Code. You can use PyCharm, you can use Sublime, you can use any editor you really want. The tools work across all editors, but we have a first-class integration with VS Code. You can trigger your code, and you can say, hey, I want this Python script to run on a number of different event sources. It's going to scale automatically for you, and if your code is never executed, if your code never triggers, you never pay any money. Even when it does trigger, you get like a million executions free every single month. So very often, even when your code does run, you're still not paying us anything, so it's great. You get some rich monitoring capabilities, and you can also set up some rich CI CD, whether you're using Travis, Azure DevOps, or any CI CD tool Jenkins, you name it. So let's go through now that we have an understanding of what serverless is Azure Functions in Python, and we want to build something. What I want to build is a simple function, a simple API that can analyze the sentiment of some text. A very hello world example, and it's going to allow us to walk us through this experience in the tools. So I mentioned we're going to spend most of our time in Visual Studio Code, so that's where I'm at now, an empty editor. I'll call out a few things. There's a few extensions in Visual Studio Code that I'm going to be using to make our life even better. The first is this Azure Functions extension, which gives us some nice Azure Functions tooling. The other one here is the Python extension, which is going to give us some nice language options. I've got a lot of extensions, so I took me a while to get to the piece. Python, obviously all of these with Visual Studio Code are all free and easy to install, but if you want to follow along at home, that's what you would need to do. So now that I have the Azure Functions extension, I can go ahead and click in here to the Azure icon and say, all right, let's create a new function. So I'm going to create a brand new project. We'll get a folder for it. Let's call this one EuroPython. And the first thing it wants to know is what language I want to write this function in. Obviously, we want to do Python, because we believe in the one true language of Python. And I have all of these different event sources. I could make this run every five minutes. I could make it run every Friday at 10 a.m. I could have it trigger on an HTTP request whenever an image gets uploaded to an Azure storage account or a message gets dropped into queue, some data changes in a database. You get the idea. There's a lot of different event sources that can say, hey, go run this script. Now I mentioned we want to write an API for sentiment, so we're going to choose the HTTP trigger. We're going to call this Analyze Sentiment. It's going to be the name of our function. I could require that there's a key and some authentication to invoke this function. In this case, I'm just going to keep it anonymous and we'll open it in the current window. So now the Azure Functions extension in Visual Studio Code is going and scaffolding for me this function project. And it's gone ahead and opened for me now kind of the base template for an HTTP triggered Azure function. So this is all the code that exists in my project. There's some metadata here that tells it what trigger it uses. I also have my requirements.txt file, which is empty right now. But this is the only code that's actually in my whole project. It's very, very lightweight. It looks almost just like a simple script or a console application. But instead of getting passed in like some arguments, some string arguments from the command line, I actually am getting an HTTP request. So when someone triggers this function, it's going to be an HTTP request. And I can now use pieces of that request, whether it's the body query parameters inside my code. Now, the simple template is just a hello world function. It's just going to look to see if you pass in a name, is either a query parameter in the body of the message, and return back a nice and friendly hello, whatever your name was. Now, what I want to show quickly here, before we start analyzing sentiment, is again, one of the nice things with Azure Function is all of the tooling. So I'm going to go ahead here and set a break point. And let's go ahead and say we want to start debugging. And this is going to go ahead and start a debug session here in Visual Studio Code. I didn't have to do a whole lot to do that. I always want to show this flashy ASCII art. Right now, on my MacBook, this could be Windows, it could be Linux, I'm running that open sourced Azure Functions runtime. So this is the same runtime that we'll be executing in the cloud. But in this case, it's actually running on my machine. It's noticed I have this HTTP triggered function. And it's even given us this nice local endpoint that I can use to test. So let's test it out now. Let's go ahead and send a request to this function. So I'm going to go ahead here. I have another very cool Visual Studio extension that actually lets me send HTTP requests when I just annotate them with this cool annotation. So I'm going to say do a post to that URL. And we want the content type to be JSON. And now this awesome Visual Studio Code extension called REST Client. Well, let me send the request right here in the editor. So I'm going to go ahead and send that request. And as soon as I click the Send button, my breakpoint was hit. I'm now debugging this function. As I step through it, I can see that I got my name property. In this case, I left my name as Azure. My name's actually Jeff. But that's fine. You can call me Azure. And when I finish the debug session, I get back my response that says hello, Azure. So that's kind of the basic experience, creating the function, debugging it. The last step that I would do here is publishing. But before we get there, let's actually add in some more complex code. I want to do that sentiment analysis, like I mentioned. And I'm actually going to use a dependency here that maybe some of you have used before called Text Blob, which gives me a bunch of machine learning capabilities to analyze text. Pull out the key phrases, pull out the nouns, pull out the sentiment. And I'm going to replace this kind of basic hello world code. And I'm going to, faster than you could have believed, type in, because I didn't type it in, type in this code to use Text Blob, to look at the text, and pull out the sentiment polarity. Now, you'll see this in a second. But what it's actually going to return back is a number. That number is going to be between negative 1 and 1. The closer to positive 1 is the more positive the sentiment. The closer to negative 1, the more negative the sentiment. Let's go ahead here and make sure I'm importing the right stuff as well. Again, using my amazing typing skills. So at this point, I pretty much have everything I need. I could actually run this right now in debug. And when I go ahead and run it, I could show you now, if I say debug again, the first thing it's going to do is it's going to go ahead and pull in that Text Blob dependency and use it to run for me. So if we now change this, it's now running the same thing. It's now analyzing sentiment. I'll go ahead and change this. I'm not passing in a name anymore. I'm not passing in text. I'm going to say I am so, so happy. Go ahead and save that and click Send. Oh, I left my break point hanging around. That's OK. And you'll see here, now I get a sentiment of 0.8. This was very happy. I could even quickly come in and make this one change to I am so, so sad. And now it's negative 0.5. So my code's working. Now I have a simple Python script. It's going to get an HTTP request. And it's going to tell me the sentiment of whatever the text I passed in. Now the one thing I want to call out, when I use this library, this text blob file locally, how it's actually working is that it installed on my machine. I'll show you this at the home directory. As part of the, what is it, NLTK library, there's these NLTK data models that right now are at my home directory that you can kind of see here. When I publish this function, it's very important that my function has access to these same models. These are the models that my Python function needs. So in order to do that, I just need to make sure that I actually copy these models into my project directory. So now I'm here in the project directory, EuroPython. And I'm just going to copy the models, NLTK data, into the current project. So now those models are available there. And I just need to add one more line. Did my super fast typing not work that time? It did. And this line is just saying, hey, NLTK, you can actually find the models in the current directory. Don't go look at the home directory. So just a pattern that's worth noting. If you're using things like models in your function, you can just include those models in your project directory column directly then. And now when I publish, which is the last step, it's going to take this entire directory, the Python script, the models. It's going to look at the requirements.txt file. And it's going to put them in a zip, send them to Azure. Now one of the new features that we actually are just rolling out now, which I'm going to show you, is that when I choose to publish this, I actually don't need this flag anymore, Text Blob requires some native dependencies. It requires that I have native Linux dependencies when it runs on Linux, when it runs on Max, it's different. When it runs on Windows, it's different still. And rather than making you deal with the complexity of knowing, oh, shoot, I just built this on my Windows or Mac, it's going to be running in a Linux container in the cloud. How do I get the right versions? One of the features that we have now is that when I go ahead and click Publish, and when I say now, I mean rolling out in the next week or two, now for me, because I'm running these bits now. What it should do at first, oh, actually, I need to make sure I've authenticated with my account. I realize I haven't done this yet. Entari's demo, this one will work. What it's going to do is it's going to look at this function that I have, realize that it's a Linux Python function. It's going to archive the directory like I mentioned, but the cool new feature I wanted to call out is that it's actually going to go pull down and do a remote build of any requirements that I've defined in my requirements.txt file. So it's actually going to use the Linux environment in the cloud to pull in the text blob dependency, do all the building there. You can see it's doing the server side build right now. It's uploading my files. All this is done for me. So regardless if I'm developing on Windows, Mac, or Linux, I'm confident knowing that my app's going to run successfully in the cloud using this new server side build tools as part of the Azure Functions experience. Now once it's done, and we don't even have to wait for it fully, it's going to give me back a URL that then anybody could call. It's not a local host URL anymore. It's going to be a.azurewebsites.net URL that anyone could then call, pass in some text, and it's going to give you back a score. So it's that easy to kind of get up and running, include dependencies that you need, include models that you need, and then finally publishing it to the cloud. In this case, I used the command line because I wanted to show off that new functionality. I could have also done the publish directly from right here in Visual Studio Code. So once this is there in the cloud, I actually have one that I published ahead of time because I figured that it would take a little bit to do the publishing and build on the internet connection here. But I do have one that's a.azurewebsites.net URL. And if I go ahead here now and just click the Send Request button, it's going to send the same text off to, in this case, now this cloud hosted function. And now running in the cloud, that same Python code is now available to anyone. Now to kind of bring this home, I want to show you, hopefully you've seen this is a very productive development experience. I can quickly get something like a Python script attached to an HTTP request and running. One of the other benefits here is the scale. The fact that now if everyone in this room tried to call the same API, if everyone in this whole city tried to call the same API, I want to know that it's going to scale and be available to everyone. So to prove this, and for the last five minutes, we're going to attach this to some data. So I'm going to take that same function that I just wrote, the Analyze sentiment. What I actually want to do is I want to populate this real-time dashboard. So this dashboard is empty right now. It's very lonely. This is a product called Microsoft Power BI. And what I actually want to attach it to is I want this to tell me everyone in the world who's tweeting, and I want to know the sentiment of those tweets and where they're tweeting from. And the thing that's going to drive understanding the sentiment is going to be calling that Azure function we just published. Now to attach it to some data, I'm going to use another serverless piece of technology in Azure called Azure Logic Apps. Now Logic Apps is a little bit different than Azure Functions, because in this case, I don't actually create code. With Logic Apps, it's serverless in the same ways that it scales to 0 or scales to n. But here, I actually create workflows, and I can integrate with different services. So I want to connect my Azure function to Twitter, just to show you some of how Azure Logic Apps works. There's actually over 200 out-of-the-box connectors here that you can use in your serverless applications in Azure to connect to services like Twitter. I'm scrolling down. You probably recognize these other ones. Hey, when someone uploads something to Dropbox, when someone adds something to GitHub, Salesforce, SAP on-premises, Dynamics 365, OneDrive, Google Drive, SendGrid, you get the idea. There's a bunch of services here. This is all function code that I don't have to write, because when I want to integrate with Twitter, I can just say, hey, let me integrate with Twitter. In this case, I want to trigger this whenever a new tweet is posted. And I want to listen for a trending topic. I look today. EuroPython is trending locally, but there are a bunch of tweets globally around Spider-Man, because the new Spider-Man movie's been coming out. So I can now trigger whenever someone tweets about Spider-Man, check Twitter every 30 seconds. That's fine. And now start to call things like my Azure functions, and say, hey, here's that Azure functions I just wrote, the EuroPython one. And I want you to go ahead and analyze the sentiment of that tweet. Now, for the sake of time, I'm not going to go build this whole thing from scratch and wait for you to watch me fill out the designer. Hopefully you get the idea of how a logic app works. So I actually have a previous version from late last night where I actually built this entire workflow. It's only four steps, nothing too crazy. So I do the same trigger, trigger on Spider-Man. The first thing I'm going to do is I'm going to analyze the sentiment. You'll see here I'm looking at the tweet text as the text that I'm passing into that Azure function that we just published. I'm going to go then categorize this. I have another Azure function that pretty much just gives it a color. If it's positive green, if it's neutral yellow, if it's negative red. And then the last one is I'm going to publish these all to that real-time dashboard that I showed you a second ago. So now let's actually watch these functions scale. As soon as I click Save here, and we'll actually click Run so we can watch it debug, this logic app's now going to start listening to Twitter. And hopefully somebody in the world right now is tweeting about Spider-Man. And if not, someone in the audience could. But I suspect they will. I picked Spider-Man specifically because it's been noisy. And you can see here's an example of one that just got executed. But I guarantee that there's hundreds more that are firing right now while I'm talking. You can see now that someone tweeted far from home spoilers. Whoa, I'm not going to read the rest of that tweet. Apparently there are spoilers in this tweet. But the sentiment of the tweet, I can see it called my function. It got back a score of 0.1 and so forth. So kind of the grand finale in crossing our fingers that this all works. This is where the suspense comes in. We should now see this Power BI dashboard. Hopefully I don't have to click Refresh here. Oh, man, this is the grand finale. This is the part that really has to work. We should see this dashboard here. OK, it's lit up. I just had to click Refresh. So now this is filling up with data. And you can see here there's been a few tweets that have come in. Not very many. Not as many as when I ran this last night. It's a little bit earlier in the US right now where a lot of those tweets were coming from. But at least these five tweets have triggered. I can see the sentiment. They didn't provide a location. They're all yellow with the green circle. That's super intuitive. But if I leave these on or if I keep refreshing, you would be able to see this dashboard just comes to life. So if hundreds of people started tweeting, there's a few more. I see some from Europe. There might even be people in this room. Thank you for your participation if you did. Oh, not that location, though. This isn't streamed, right? But that gives you the idea. So the thing here, I was hoping this would have been a noisier Twitter topic. But the idea here is that if thousands of people were tweeting, that simple function, that 20 line function that we wrote just a few seconds ago, can just automatically scale and be available to all of those requests as they come in. That's really where Azure Functions comes in. I didn't have to think about that. You didn't see me SSH into any servers. You didn't have me configure any knobs of scale settings. I don't have to. I just say, here's my code. Here's the event I want you to trigger on. And then let it go to work. All right, so for next steps, for the last five minutes, there's a few things here. I'd encourage all of you to go give Azure Functions a try. Probably the best place to start is our Quick Start. This is entirely using the command line tools. So it does work with VS Code like I did. But if you're using PyCharm, if you're using Sublime, if you're using whatever other editor, the same Quick Start will work just great for you. And you can get up and running and just run this all locally, even without an Azure account. If you do want an Azure account, I didn't have a link here. You go to azure.com. You can get a massive free credit. I think it's like 200 euros to get started with Azure, though Azure Functions is pretty much free for most everyone because of the million executions a month you get for free. We also have a video that walks through building an app similar to this one, just a different scenario. One of the things I wanted to mention is there's serverlesslibrary.net. This is a website that has a bunch of samples of different functions that people have written. So if I come here and I say, hey, I want to look at Python samples, these come from customers, these come from developers on our team. You can see here there's stuff with like, hey, a Python one that does some serverless IoT. I know there's some here about data cleaning. One of our customers built a data cleaning pipeline using ML and Python. I could click in here, edit it directly in Visual Studio Code, or browse to the code on GitHub to give me some samples as I get started and learning about what I can do with functions. If you're interested in the code I used with TextBlog, I posted that on my own GitHub account. And then finally, if you haven't stopped by the Microsoft booth already, please stop by. We've got awesome socks. We have many members from both the Azure Functions team, the Visual Studio Code team, Jupyter Notebooks. We're more than happy to help you come talk to us, get some swag, get some of those socks and stickers. And if you're interested specifically on Azure Functions and serverless, we have a Twitter handle on the Azure Functions account, as well as my own personal one. So hopefully you've understood, and this gives you an idea of what Azure Functions are, how easy they are for you to get started with, and how you could start to take advantage of not having to worry about all those complex pieces of hosting an application, and just get started with the code that you want, all using a fully open tool set in Azure Functions. So thank you all very much. It's been awesome being with you all here today. Thank you, Jeff. And great talk. So any questions? We have some time. Please come to the microphones. Thanks, Jeff. Quick question. If I wanted to dockerize a number of small flash gaps and bang them up on functions, so I don't have to worry about them, can I do that now? Is it viable for production? Yes, so I actually was debating whether I was going to show this or not as I looked in the... And if I heard you're right, you want to dockerize the functions correctly. So one of the benefits about Azure Functions being open source and our kind of engagement with the open source community is to actually just come back into this existing project. I'm not going to change anything. This is the one we wrote from scratch, but I'm just going to write this command to initialize a docker file. Now automatically, without me even having to do the work, this tool looked at the project, and it's actually generated for me here a valid docker file that will run Python functions in any environment that I want to run them in. Now I could even publish these containers to Azure and have them run, because sometimes I might want to say, like, hey, I actually want to customize the environment. I want to install whatever some package that might not be included in our image. You can do that here and publish it. But the other one that we're seeing increasing interest in is that I could dockerize this and run it maybe on premises. In fact, recently we've announced a project in partnership with Red Hat called Kata, which will give you serverless scaling, serverless event-driven scaling, for containers running in Kubernetes. And Kata works natively with Azure functions and containers just like this one. So if I wanted to run functions in a container, maybe as part of a Kubernetes microservices in the cloud or on premises, maybe an open shift, using a combination of this docker file and things like Kata, I can get the same serverless scale experience in a production ready way right now. So definitely something that we've provided, actually first-class tooling support for those docker scenarios and something that we hope many of you take advantage of. So great question. All right, I think we have time for one more. Yeah. Yeah. Hi, thanks for the demo. I was wondering why is my Uber only allowed to rise for 10 minutes? Yes, you get kicked out of your Uber after 10 minutes in the function world. Yes, so Azure functions, we have a few pricing models. The first one is the consumption one. That's what is published to you by default. It scales to zero, it can scale up to whatever. And there is a 10-minute execution limit. That's there mostly because of how the consumption plan works where recycling machines very often. That's as much as we can kind of guarantee without us worrying that we're gonna reboot it. That said, though, we actually do have an option which is getting Python support actually next week called the premium plan. And the premium plan has the same serverless scale. It's a little bit more expensive as the name would make you believe it's premium. But one of the features you get from it is you can actually have unbounded, I was making my hands very big, unbounded executions. So you could have executions that last for six hours, eight hours. In the premium plan is the only place where we're not going to guarantee we're gonna recycle these VMs super often. So that's the model today. Though it's a common request, so feel free to keep giving us feedback as well. But it is an option, you just have to choose a different hosting plan. Great. Okay, so I think that's all the time. I wanna make sure that there's time for the next speaker to come up because there's an awesome keynote, I believe, about public speaking. So a very good topic as well. So with that, thank you all again very much. It's been awesome. Thank you. Thank you. Thank you all so much.
a little bit better than when I give this talk also these platform as a service offerings, development experience that you get, and first-class integration with VS Code. You can great. You get some rich monitoring capabilities, serverless is Azure Functions in Python, and we through this experience in the tools. So I to create a brand new project. We'll get a folder now debugging this function. As I step through get up and running, include dependencies that you finally publishing it to the cloud. In this case, connectors here that you can use in your you get the idea of how a logic app works. So I me SSH into any servers. You didn't have me this all locally, even without an Azure account. in Visual Studio Code, or browse to the code on and how you could start to take advantage of not them in. Now I could even publish these actually first-class tooling support for those