BPB Online LLP
Building Web Apps with Python and Flask
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

A practical guide for the rapid web application development with Flask

Key Features
Expert-led coverage of core capabilities of Flask, key extensions and its implementation.
Explore the Werkzeug toolkit and Jinja Template engine and see how Flask interacts with JavaScript and CSS.
Detailed modules on building and deploying RESTful applications using Flask.

Description
This book teaches the reader the complete workflow of developing web applications using Python and its most outperforming microframework, Flask.
The book begins with getting you up to speed in developing a strong understanding of the web application development process and how Python is used in developing the applications. You will learn how to write your own first Flask-based web application in Python. You will learn about web gateway interfaces, including CGI and WSGI along with various tools like the Jinja 2 engine, Werkzeug toolkit, and Click toolkit.
You will learn and practice the core features of Flask such as URL routing, rendering, handling static assets of a web application, how to handle cookies and sessions, and other HTTP objects. Once you have developed a strong knowledge of Flask, you will now dive deeper into advanced topics that includes Flask extensions for working with relational and NOSQL databases, Flask_WTF, and Flask-Bootstrap. You will explore design patterns, various blueprints on how to build modular and scalable applications, and finally how to deploy the RESTful APIs successfully on your own.

What you will learn
Get to know everything about the core capabilities of Flask.
Understand the basic building blocks of Flask.
Get familiar with advanced features of Flask, including blueprints, Flask extensions, and database connectivity.
Get ready to design your own Flask-based web applications and RESTful APIs.
Learn to build modular and scalable applications and how to deploy them successfully.

Who this book is for
This book is ideal for Python enthusiasts, open source contributors, and web app developers who intend to add Python web technologies in their skillsets and startup companies. The understanding of the core Python language with intermediate level expertise is required and experience of working with SQL, HTML, CSS, and JavaScript is an added advantage.

Table of Contents
1. Python for CGI
2. WSGI
3. Flask Fundamentals
4. URL Routing
5. Rendering Templates
6. Static Files
7. HTTP Objects
8. Using Databases
9. More Flask Extensions
10. Blueprints and Contexts
11. Web API with Flask
12. Deploying Flask Applications
13. Appendix

About the Author
Malhar Lathkar is an independent software professional, corporate trainer, freelance technical writer, and Subject Matter Expert with an experience of more than three decades. He has trained hundreds of students/professionals in Python, Data Science, Java and Android, PHP and web development, etc.
He also has the experience of delivering talks and conducting workshops on various IT topics.He writes regularly in a local newspaper on sports and technology-related current topics.

LinkedIn Profile: https://www.linkedin.com/in/malharlathkar

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.