Skip to Main Content
Python Programming Blueprints
book

Python Programming Blueprints

by Daniel Furtado, Marcus Pennington
February 2018
Intermediate to advanced content levelIntermediate to advanced
456 pages
9h 56m
English
Packt Publishing
Content preview from Python Programming Blueprints

Creating a Flask server

We will now create a new Flask web server, which will replace our Nameko Web Server. Flask is better suited to handling web requests than Nameko and comes with a lot more baked in while still being fairly lightweight. One of the features we will take advantage of is Sessions, which will allow our server to keep track of who's logged in. It also works with Jinja2 for templating, meaning that our existing template should already work.

Start by adding flask to our base.in file, then pip-compile and install (version 0.12.2 at the time of writing) using the same process as earlier.

Getting started with Flask is quite straightforward; we will start by creating our new home page endpoint. Within your temp_messenger directory, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Intelligent Projects Using Python

Intelligent Projects Using Python

Santanu Pattanayak, Manohar Swamynathan
Flask Blueprints

Flask Blueprints

Joël Perras
Matplotlib for Python Developers - Second Edition

Matplotlib for Python Developers - Second Edition

Aldrin Yim, Claire Chung, Allen Yu

Publisher Resources

ISBN: 9781786468161Supplemental Content