Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Andrew T. Baker - 5 ways to deploy your Python ...

Andrew T. Baker - 5 ways to deploy your Python web app in 2017

You’ve built a fine Python web application and now you’re ready to share it with the world. But what’s the best way to deploy your app in 2017?

This talk will demonstrate popular techniques for deploying Python web applications. We’ll start with a simple Flask application and expose it to the world five times over as we learn to use different tools and services available to the modern Python developer.

Specific topics covered include:

* Exposing your local dev environment with [ngrok](https://ngrok.com/)
* Using a Platform-as-a-Service (PaaS) like [Heroku](https://www.heroku.com/)
* Going “serverless” with [AWS Lambda](https://aws.amazon.com/lambda/)
* Configuring your own VM with [Google Compute Engine](https://cloud.google.com/compute/)
* Thinking inside the box using [Docker](https://www.docker.com/)

We’ll also briefly touch on the pros and cons of each technique to help you figure out which one is right for your app.

At the end of this talk you will have a basic understanding of how each of these techniques work and you’ll be ready to try them out yourself.

https://us.pycon.org/2017/schedule/presentation/779/

PyCon 2017

May 21, 2017
Tweet

More Decks by PyCon 2017

Other Decks in Programming

Transcript

  1. PRIVILEGED & CONFIDENTIAL, COPYRIGHT 2016 TWILIO INC. FIVE WAYS TO

    DEPLOY YOUR PYTHON WEB APP IN 2017 Andrew T. Baker
 PyCon 2017
  2. PRIVILEGED & CONFIDENTIAL, COPYRIGHT 2016 TWILIO INC. PROS •Fast and

    easy •Handy for demos •And hacking on webhooks •Stops when you close your laptop •Random domains •Definitely 
 doesn’t scale CONS
  3. PRIVILEGED & CONFIDENTIAL, COPYRIGHT 2016 TWILIO INC. PROS •One app

    24/7
 for free •Zero server management •Add-ons ecosystem •Scaling is easy but gets pricey •Harder server customization •Some add-ons better than others CONS
  4. PRIVILEGED & CONFIDENTIAL, COPYRIGHT 2016 TWILIO INC. PROS • Economical

    for small to medium loads • Good for “spikey” traffic • Zero server config •Relatively new technique •Less fun without Zappa •Can be tricky to troubleshoot CONS
  5. PRIVILEGED & CONFIDENTIAL, COPYRIGHT 2016 TWILIO INC. PROS •Full control

    •Scales as much as your wallet •Economical… if you’re careful • More work for you • There’s a lot more to learn • Harder to predict ultimate costs CONS
  6. PRIVILEGED & CONFIDENTIAL, COPYRIGHT 2016 TWILIO INC. PROS •Helps with

    dev / prod parity •Nice for “microservices” •Impress your friends •Newest technique •Works best when you go all-in •Has its own learning curve CONS
  7. PRIVILEGED & CONFIDENTIAL, COPYRIGHT 2016 TWILIO INC. 1. ngrok 2.

    Heroku 3. “Serverless” 4. Virtual Machines 5. Docker THANK YOU @andrewtorkbaker