Building Web Apps with Python and Flask
US$ 19.95
The publisher has enabled DRM protection, which means that you need to use the BookFusion iOS, Android or Web app to read this eBook. This eBook cannot be used outside of the BookFusion platform.
Description
Contents
Reviews
Language
English
ISBN
9789389898835
Cover Page
Title Page
Copyright Page
Dedication Page
About the Author
About the Reviewer
Acknowledgement
Preface
Errata
Table of Contents
1. Python for CGI
Introduction
Structure
Objectives
Advent of WWW
What is CGI?
Configuration of Apache Server
The Basics of HTTP Protocol
Request Methods
The cgi Module
Cookies
Alternatives to CGI
Conclusion
2. WSGI
Introduction
Structure
Objectives
PEP 333
The environ Dictionary object
WSGI Environment Variables
The wsgiref Package
Validator
HTML Form in a WSGI application
URL Routing
Web Frameworks
Flask
Conclusion
3. Flask Fundamentals
Introduction
Structure
Objectives
Werkzeug
Jinja2 Template Engine
Click
Installing Flask
Hello Flask Application
Debug Mode
Conclusion
4. URL Routing
Introduction
Structure
Objectives
Flask Script
Application object
Route Decorator
The add_url_rule() method
The url_for() Function
The redirect() Function
Variable Parts in URL
Conclusion
5. Rendering Templates
Introduction
Structure
Objectives
HTML Tags
Flask application structure
The render_template() Function
Conditional Statements
Loops in Template
Macros
Filters
Template Inheritance
Conclusion
6. Static Files
Introduction
Structure
Objectives
Document Object Model
JavaScript and DOM
JavaScript in Flask
CSS and DOM
Inline Definition
Style Definitions in the <head> element
External CSS File
CSS and Flask
Images in Flask App
Conclusion
7. HTTP Objects
Introduction
Structure
Objectives
Request Object
GET Method
POST Method
Response Object
Cookies
Managing Sessions
Message Flashing
Uploading a File
Conclusion
8. Using Databases
Introduction
Structure
Objectives
DB-API
CREATE TABLE
INSERT DATA
READ DATA
Object Relation Model
SQLAlchemy
Flask extensions
Flask-SQLAlchemy
Relationship
NoSQL Databases
Flask-PyMongo
Flask-MongoEngine
Conclusion
9. More Flask Extensions
Introduction
Structure
Objectives
Flask-WTF
Fields
Validators
Form Class
Rendering the WTForm Object
Flask-Login
Flask-Bootstrap
Other Useful Extensions
Flask-Admin
Flask-Mail
Flask-Uploads
Conclusion
10. Blueprints and Contexts
Introduction
Structure
Objectives
Application Package
Application Context
Request context
Request Callbacks
Application Factory
Signals
Blueprints
Conclusion
11. Web API with Flask
Introduction
Structure
Objective
What is API?
REST
Route-based REST API
What is cURL?
Class-based Views
Flask-RESTful
Postman App
Conclusion
12. Deploying Flask App
Introduction
Structure
Objectives
Google App Engine
Heroku
PythonAnywhere
mod_wsgi
uWSGI
Flask App as CGI
Other options
Conclusion
Appendix: Python QuickStart
Get Started
Data Types
Indexing and Slicing
Conditionals
while loop
for loop
Functions
Class and Object
Inheritance
Overriding
Script Mode
Index
The book hasn't received reviews yet.