April 2014
Flask is a web framework for Python based on Werkzeug, Jinja2 and good intentions. It is considered a micro-framework, but don't get the "micro" part fool you; Flask can do everything the others can do, many times in a simpler, leaner way.
Flask Web Development is a hands-on book that walks you through the development of a modern real world application from start to end.
http://flaskbook.com/
Part I. Introduction to Flask
1. Installation
Using Virtual Environments
Installing Python Packages with pip
2. Basic Application Structure
Initialization
Routes and View Functions
Server Startup
A Complete Application
Flask Extensions
The Request-Response Cycle
3. Templates
The Jinja2 Template Engine
Twitter Bootstrap Integration with Flask-Bootstrap
Custom Error Pages
Links
Static Files
Localization of Dates and Times with Flask-Moment
4. Web Forms
Cross-Site Request Forgery (CSRF) Protection
Form Classes
HTML Rendering of Forms
Form Handling in View Functions
Redirects and User Sessions
Message Flashing
5. Databases
SQL Databases
NoSQL Databases
SQL or NoSQL?
Python Database Frameworks
Database Management with Flask-SQLAlchemy
Database Use in View Functions
Integration with the Python Shell
Database Migrations with Flask-Migrate
6. Emails
Email Support with Flask-Mail
7. Large Application Structure
Project Structure
Configuration Options
Application Package
Launch Script
Unit Tests
Requirements File
Database Setup
Part II. Example: A Social Blogging Application
8. User Authentication
Authentication Extensions for Flask
Password Security
Creating an Authentication Blueprint
User Authentication with Flask-Login
New User Registration
Account Confirmation
Account Management
9. User Roles
Database Representation of Roles
Role Assignment
Role Verification
10. User Profiles
Profile Information
User Profile Page
Profile Editor
User Avatars
11. Blog Posts
Blog Post Submission and Display
Blog Posts in Profile Pages
Paginating Long Lists of Blog Posts
Rich Text Posts with Markdown and Flask-PageDown
Permanent Links to Blog Posts
Blog Post Editor
12. Followers
Database Relationships Revisited
Followers in the Profile Page
Query Followed Posts using a Database Join
Show Followed Posts in the Home Page
13. User Comments
Database Representation of Comments
Comment Submission and Display
Comment Moderation
14. Application Programming Interfaces (APIs)
Introduction to REST
RESTful Web Services with Flask
Part III. The Last Mile
15. Testing
Obtaining Code Coverage Reports
The Flask Test Client
End-to-End Testing with Selenium
Is It Worth It?
16. Performance
Logging Slow Database Performance
Source Code Profiling
17. Deployment
Deployment Workflow
Logging of Errors In Production
Cloud Deployment
The Heroku Platform
Traditional Hosting
18. Additional Resources
Using an Integrated Development Environment
Finding Flask Extensions
Getting Involved with Flask