Flask Blueprints

Dive into the world of the Flask microframework to develop an array of web applications
Preview in Mapt

Flask Blueprints

Joël Perras

1 customer reviews
Dive into the world of the Flask microframework to develop an array of web applications
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Flask Blueprints Book Cover
Flask Blueprints
$ 35.99
$ 25.20
Flask: Building Python Web Services Book Cover
Flask: Building Python Web Services
$ 79.99
$ 56.00
Buy 2 for $35.00
Save $80.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781784394783
Paperback198 pages

Book Description

Flask is a small but powerful web development framework for Python. Though Flask is termed a micro-framework, it is no way lacking in functionality; there are many extensions available to Flask which helps it to function at the same level as other large frameworks such as Django and Ruby on Rails.

This book will demonstrate how to develop a series of web application projects with the Python web micro-framework, and leverage extensions and external Python libraries and APIs to extend the development of a variety of larger and more complex web applications.

The book will start by explaining Python’s Virtualenv library and how to create and switch between multiple virtual environments. You’ll first build an SQL database-backed application, which will use Flask-WTF, Flask-SQLAlchemy, Jinja templates, and other methods. Next you’ll move on to a timeline application, built using concepts including pytest-Flask, the Blinker package, data modelling for user timelines, exception handling, and creating and organizing CLI tools.

Moving on, you’ll discover how to implement a photo timeline application where you’ll explore topics such as writing and running celery tasks, API error handling and testing, and Werkzeug middlewares.

Finally, the book walks you through creating an application which fetches data from GitHub and stores it locally. You will also learn how to install and configure Flask-Click extension.

Table of Contents

Chapter 1: Starting on the Right Foot – Using Virtualenv
Setuptools and pip
Avoiding dependency hell, the Python way
Working with virtualenv
Simplifying common operations – using the virtualenvwrapper tool
Summary
Chapter 2: Small to Big – Growing the Flask Application Structure
Your first Flask application structure
From module to package
From package to blueprint
Summary
Chapter 3: Snap – the Code Snippet Sharing Application
Getting started
Summary
Chapter 4: Socializer – the Testable Timeline
Starting off
Application factories
Unit and functional testing
Social features – friends and followers
Functional and integration testing
Publish/subscribe events with Blinker
Graceful handling of exceptions
Functional testing
Your newsfeed
Summary
Chapter 5: Shutterbug, the Photo Stream API
Starting off
The application factory
Interlude – Werkzeug
Simple APIs with Flask-RESTful
Summary
Chapter 6: Hublot – Flask CLI Tools
Starting off
Summary
Chapter 7: Dinnerly – Recipe Sharing
First OAuth
Setting up the application
Interlude – database migrations
Summary

What You Will Learn

  • Use the virtualenv Python package to effectively isolate your development environments
  • Convert a simple one-file Flask application into a more full-fledged multi-package application
  • Integrate Flask-Login for simple user authentication, Flask-WTF for forms, and Flask-SQLAlchemy for database interactions
  • Explore URL routing and dispatching in a blueprint structured application
  • Create your own signals and consume them within your application
  • Learn to leverage Werkzeug, the WSGI library that powers much of Flask
  • Implement custom exceptions for handling non-20x response codes
  • Write your own CLI tools for administrative and development tasks of your Flask application using Flask-Script/Click
  • Build your Flask extensions to encapsulate reusable behaviors across your applications
  • Integrate your application with open source JavaScript-based graphing libraries to create simple data visualizations

Authors

Table of Contents

Chapter 1: Starting on the Right Foot – Using Virtualenv
Setuptools and pip
Avoiding dependency hell, the Python way
Working with virtualenv
Simplifying common operations – using the virtualenvwrapper tool
Summary
Chapter 2: Small to Big – Growing the Flask Application Structure
Your first Flask application structure
From module to package
From package to blueprint
Summary
Chapter 3: Snap – the Code Snippet Sharing Application
Getting started
Summary
Chapter 4: Socializer – the Testable Timeline
Starting off
Application factories
Unit and functional testing
Social features – friends and followers
Functional and integration testing
Publish/subscribe events with Blinker
Graceful handling of exceptions
Functional testing
Your newsfeed
Summary
Chapter 5: Shutterbug, the Photo Stream API
Starting off
The application factory
Interlude – Werkzeug
Simple APIs with Flask-RESTful
Summary
Chapter 6: Hublot – Flask CLI Tools
Starting off
Summary
Chapter 7: Dinnerly – Recipe Sharing
First OAuth
Setting up the application
Interlude – database migrations
Summary

Book Details

ISBN 139781784394783
Paperback198 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Flask Framework Cookbook Book Cover
Flask Framework Cookbook
$ 26.99
$ 18.90
Mastering Object-oriented Python Book Cover
Mastering Object-oriented Python
$ 26.99
$ 18.90
Flask Framework Cookbook Book Cover
Flask Framework Cookbook
$ 26.99
$ 18.90
Functional Python Programming Book Cover
Functional Python Programming
$ 29.99
$ 21.00
Python Network Programming Cookbook Book Cover
Python Network Programming Cookbook
$ 26.99
$ 18.90
Python Machine Learning Book Cover
Python Machine Learning
$ 35.99
$ 25.20