2016-02-29T06:44:29Z
"Flask At Scale" tutorial at PyCon 2016 in Portland

The tutorial line up for PyCon 2016 in Portland, Oregon has been announced, and I'm excited to be part of it with yet another Flask tutorial. For some odd reason, not all the class information I provided with my proposal was published on the PyCon website, so I want to give you a good overview of the material I plan to cover here, to help you decide if this tutorial is for you.
My Flask tutorial is scheduled for Saturday, May 28th from 9am to 12:20pm. PyCon tutorials have a registration fee of $150 each if purchased ahead of time, or $200 if purchased the same day at the door. Note that tutorial fees are separate and not included in the conference registration. Your tutorial registration also gives you access to lunch on the tutorial day.
If you want to have an idea of what you get from one of my Flask tutorials, here are the two that I gave in past years:
Flask Workshop: A beginner's Flask tutorial I gave at PyCon 2015
Flask By Example: An intermediate Flask tutorial I gave at PyCon 2014
This class that I'm preparing for this year's PyCon is for intermediate and advanced Flask developers looking to learn the patterns and best practices that can help scale a Flask application, both in terms of application size and load. In terms of complexity, this class would go after the two above and will be the most advanced Flask class I have ever given. The topics are divided into two main areas:
- Large applications: How to organize code, templates and static files in a way that allows the application to grow without becoming a mess.
- Flask under load: Different ways to deploy a Flask application so that it can handle large numbers of clients.
Below you can see the description and abstract as published on the PyCon website, plus the tentative class outline, which was not published:
Description
Do you think that because Flask is a micro-framework, it must only be good for small, toy-like web applications? Well, not at all! In this tutorial I am going to show you a few patterns and best practices that can take your Flask application to the next level.
Abstract
Can Flask scale? For many, that is the million dollar question. Unfortunately even the Flask official documentation is ambiguous about this topic. Flask is a small, unobtrusive framework that simplifies the interface between your application and the web server. Outside of that, it mostly stays out of your way, so if you need to write an application that can scale, Flask is not going to prevent it, and in fact, it will allow you to freely choose the components of your stack and not impose choices on you like big frameworks tend to do.
In this tutorial session, I will walk you through a list of typical patterns for medium and large applications written in Flask, specifically chosen to highlight scalability patterns and best practices that you will be able to transfer to your own projects. The class will be divided in two main sections, dedicated to scalability of the code (i.e. how to write large applications with Flask) and scalability of the deployed application (i.e. how to handle large numbers of clients).
Outline
- Introduction (10 min)
- Large applications (1 hour)
- How to structure a large application
- Using Blueprints to organize an application
- Decorators as a way to simplify application code
- Combining a web application with a REST API
- API versioning
- Flask under load (1 hour)
- Asynchronous requests
- Using a Celery job queue
- Using multiple processes and hosts with a load balancer
- Using coroutine frameworks such as eventlet or gevent
- Using WebSocket for server-push and reduced latency
- Free-form Discussion and Q&A (50 min)
I hope this additional information helps you decide if you want to attend. And by the way, I'm only starting to prepare the material for this class, so I'm happy to accept suggestions for topics I may have not included that fit the theme of the class.
I hope to see you in Portland, either at my tutorial or around the conference!
Miguel


#1 Fiit said 2016-02-29T07:17:17Z
#2 Marco said 2016-02-29T10:06:18Z
#3 Miguel Grinberg said 2016-02-29T16:54:44Z
#4 Christophe BAL said 2016-03-01T19:35:27Z
#5 newbie said 2016-03-04T11:59:56Z
#6 Akin said 2016-05-15T07:05:12Z
#7 Miguel Grinberg said 2016-05-16T19:02:06Z
#8 David said 2016-10-14T17:33:42Z
#9 Miguel Grinberg said 2016-10-15T06:15:27Z
#10 Josh said 2017-01-25T22:02:23Z
#11 Miguel Grinberg said 2017-01-26T03:52:39Z
#12 Josh said 2017-01-26T17:28:19Z
#13 Miguel Grinberg said 2017-01-27T02:14:38Z
#14 tiwx2 said 2017-01-31T13:46:34Z
#15 Miguel Grinberg said 2017-01-31T18:58:57Z
#16 Fisher said 2017-02-04T08:34:19Z
#17 Miguel Grinberg said 2017-02-04T18:46:35Z
#18 Fisher said 2017-02-05T10:16:15Z
#19 Miguel Grinberg said 2017-02-06T21:04:19Z
#20 Paul Symonds said 2017-04-30T01:38:09Z
#21 Miguel Grinberg said 2017-04-30T18:44:33Z
#22 King Kunta said 2017-08-08T07:24:03Z
#23 Miguel Grinberg said 2017-08-08T15:32:02Z
#24 Brendan said 2017-09-03T22:13:35Z
#25 Miguel Grinberg said 2017-09-04T16:30:48Z