#
#

Flask Web Development: Developing web applications with python (Record no. 2435)

MARC details
000 -LEADER
fixed length control field 10060nam a22002177a 4500
003 - CONTROL NUMBER IDENTIFIER
control field OSt
005 - DATE AND TIME OF LATEST TRANSACTION
control field 20200224131928.0
008 - FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION
fixed length control field 200117b ||||| |||| 00| 0 eng d
020 ## - INTERNATIONAL STANDARD BOOK NUMBER
International Standard Book Number 978-93-5213-699-5
028 ## - PUBLISHER NUMBER
Source Allied Informatics, Jaipur
Bill Number 7084
Bill Date 13/01/2020
Purchase Year 2019-20
040 ## - CATALOGING SOURCE
Original cataloging agency BSDU
Language of cataloging English
Transcribing agency BSDU
082 ## - DEWEY DECIMAL CLASSIFICATION NUMBER
Classification number 006.8
Item number GRI
100 ## - MAIN ENTRY--PERSONAL NAME
Personal name Grinberg, Miguel
245 ## - TITLE STATEMENT
Title Flask Web Development: Developing web applications with python
250 ## - EDITION STATEMENT
Remainder of edition statement 2nd
260 ## - PUBLICATION, DISTRIBUTION, ETC.
Place of publication, distribution, etc. Mumbai
Name of publisher, distributor, etc. Shroff Publishers & Distributors Pvt. Ltd.
Date of publication, distribution, etc. 2019
300 ## - PHYSICAL DESCRIPTION
Extent 291
504 ## - BIBLIOGRAPHY, ETC. NOTE
Bibliography, etc. note Take full creative control of your web applications with Flask, the Python-based microframework. With the second edition of this hands-on book, you’ll learn Flask from the ground up by developing a complete, real-world application created by author Miguel Grinberg. This refreshed edition accounts for important technology changes that have occurred in the past three years.<br/><br/><br/>Explore the framework’s core functionality, and learn how to extend applications with advanced web techniques such as database migrations and an application programming interface. The first part of each chapter provides you with reference and background for the topic in question, while the second part guides you through a hands-on implementation.<br/><br/>If you have Python experience, you’re ready to take advantage of the creative freedom Flask provides. Three sections include:<br/><br/>A thorough introduction to Flask: explore web application development basics with Flask and an application structure appropriate for medium and large applications<br/>Building Flasky: learn how to build an open source blogging application step-by-step by reusing templates, paginating item lists, and working with rich text<br/>Going the last mile: dive into unit testing strategies, performance analysis techniques, and deployment options for your Flask application<br/><br/>Contents<br/>Table of Contents<br/>Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi<br/>Part I. Introduction to Flask<br/>1. Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1<br/>Creating the Application Directory 2<br/>Virtual Environments 2<br/>Creating a Virtual Environment with Python 3 3<br/>Creating a Virtual Environment with Python 2 3<br/>Working with a Virtual Environment 4<br/>Installing Python Packages with pip 5<br/>2. Basic Application Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7<br/>Initialization 7<br/>Routes and View Functions 8<br/>A Complete Application 9<br/>Development Web Server 10<br/>Dynamic Routes 12<br/>Debug Mode 13<br/>Command-Line Options 15<br/>The Request-Response Cycle 17<br/>Application and Request Contexts 17<br/>Request Dispatching 18<br/>The Request Object 19<br/>Request Hooks 20<br/>Responses 21<br/>Flask Extensions 23<br/>v<br/>3. Templates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25<br/>The Jinja2 Template Engine 26<br/>Rendering Templates 26<br/>Variables 27<br/>Control Structures 28<br/>Bootstrap Integration with Flask-Bootstrap 30<br/>Custom Error Pages 33<br/>Links 36<br/>Static Files 37<br/>Localization of Dates and Times with Flask-Moment 38<br/>4. Web Forms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43<br/>Configuration 44<br/>Form Classes 44<br/>HTML Rendering of Forms 47<br/>Form Handling in View Functions 48<br/>Redirects and User Sessions 51<br/>Message Flashing 53<br/>5. Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57<br/>SQL Databases 57<br/>NoSQL Databases 58<br/>SQL or NoSQL? 59<br/>Python Database Frameworks 59<br/>Database Management with Flask-SQLAlchemy 61<br/>Model Definition 62<br/>Relationships 64<br/>Database Operations 66<br/>Creating the Tables 66<br/>Inserting Rows 66<br/>Modifying Rows 68<br/>Deleting Rows 68<br/>Querying Rows 68<br/>Database Use in View Functions 71<br/>Integration with the Python Shell 72<br/>Database Migrations with Flask-Migrate 73<br/>Creating a Migration Repository 73<br/>Creating a Migration Script 74<br/>Upgrading the Database 75<br/>Adding More Migrations 76<br/>vi | Table of Contents<br/>6. Email. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79<br/>Email Support with Flask-Mail 79<br/>Sending Email from the Python Shell 81<br/>Integrating Emails with the Application 81<br/>Sending Asynchronous Email 83<br/>7. Large Application Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85<br/>Project Structure 85<br/>Configuration Options 86<br/>Application Package 88<br/>Using an Application Factory 88<br/>Implementing Application Functionality in a Blueprint 90<br/>Application Script 93<br/>Requirements File 93<br/>Unit Tests 94<br/>Database Setup 96<br/>Running the Application 97<br/>Part II. Example: A Social Blogging Application<br/>8. User Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101<br/>Authentication Extensions for Flask 101<br/>Password Security 102<br/>Hashing Passwords with Werkzeug 102<br/>Creating an Authentication Blueprint 105<br/>User Authentication with Flask-Login 107<br/>Preparing the User Model for Logins 107<br/>Protecting Routes 108<br/>Adding a Login Form 109<br/>Signing Users In 111<br/>Signing Users Out 112<br/>Understanding How Flask-Login Works 113<br/>Testing Logins 114<br/>New User Registration 115<br/>Adding a User Registration Form 115<br/>Registering New Users 117<br/>Account Confirmation 118<br/>Generating Confirmation Tokens with itsdangerous 118<br/>Sending Confirmation Emails 120<br/>Account Management 125<br/>Table of Contents | vii<br/>9. User Roles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127<br/>Database Representation of Roles 127<br/>Role Assignment 131<br/>Role Verification 132<br/>10. User Pro€les. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137<br/>Profile Information 137<br/>User Profile Page 138<br/>Profile Editor 141<br/>User-Level Profile Editor 141<br/>Administrator-Level Profile Editor 143<br/>User Avatars 146<br/>11. Blog Posts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151<br/>Blog Post Submission and Display 151<br/>Blog Posts on Profile Pages 154<br/>Paginating Long Blog Post Lists 155<br/>Creating Fake Blog Post Data 155<br/>Rendering in Pages 157<br/>Adding a Pagination Widget 158<br/>Rich-Text Posts with Markdown and Flask-PageDown 161<br/>Using Flask-PageDown 162<br/>Handling Rich Text on the Server 164<br/>Permanent Links to Blog Posts 165<br/>Blog Post Editor 167<br/>12. Followers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171<br/>Database Relationships Revisited 171<br/>Many-to-Many Relationships 172<br/>Self-Referential Relationships 174<br/>Advanced Many-to-Many Relationships 174<br/>Followers on the Profile Page 178<br/>Querying Followed Posts Using a Database Join 181<br/>Showing Followed Posts on the Home Page 183<br/>13. User Comments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189<br/>Database Representation of Comments 189<br/>Comment Submission and Display 191<br/>Comment Moderation 193<br/>14. Application Programming Interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199<br/>Introduction to REST 199<br/>viii | Table of Contents<br/>Resources Are Everything 200<br/>Request Methods 201<br/>Request and Response Bodies 201<br/>Versioning 202<br/>RESTful Web Services with Flask 203<br/>Creating an API Blueprint 203<br/>Error Handling 204<br/>User Authentication with Flask-HTTPAuth 206<br/>Token-Based Authentication 208<br/>Serializing Resources to and from JSON 210<br/>Implementing Resource Endpoints 213<br/>Pagination of Large Resource Collections 216<br/>Testing Web Services with HTTPie 217<br/>Part III. The Last Mile<br/>15. Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221<br/>Obtaining Code Coverage Reports 221<br/>The Flask Test Client 224<br/>Testing Web Applications 225<br/>Testing Web Services 228<br/>End-to-End Testing with Selenium 230<br/>Is It Worth It? 234<br/>16. Performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237<br/>Logging Slow Database Performance 237<br/>Source Code Profiling 239<br/>17. Deployment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241<br/>Deployment Workflow 241<br/>Logging of Errors During Production 242<br/>Cloud Deployment 243<br/>The Heroku Platform 244<br/>Preparing the Application 244<br/>Testing with Heroku Local 253<br/>Deploying with git push 254<br/>Deploying an Upgrade 255<br/>Docker Containers 256<br/>Installing Docker 256<br/>Building a Container Image 257<br/>Running a Container 261<br/>Table of Contents | ix<br/>Inspecting a Running Container 262<br/>Pushing Your Container Image to an External Registry 263<br/>Using an External Database 264<br/>Container Orchestration with Docker Compose 265<br/>Cleaning Up Old Containers and Images 269<br/>Using Docker in Production 270<br/>Traditional Deployments 270<br/>Server Setup 271<br/>Importing Environment Variables 271<br/>Setting Up Logging 272<br/>18. Additional Resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275<br/>Using an Integrated Development Environment (IDE) 275<br/>Finding Flask Extensions 276<br/>Getting Help 276<br/>Getting Involved with Flask 277<br/>Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279<br/>x | Table of Contents
650 ## - SUBJECT ADDED ENTRY--TOPICAL TERM
Topical term or geographic name entry element Python
942 ## - ADDED ENTRY ELEMENTS (KOHA)
Source of classification or shelving scheme Dewey Decimal Classification
Koha item type Books
Holdings
Withdrawn status Lost status Source of classification or shelving scheme Damaged status Not for loan Home library Current library Shelving location Date acquired Cost, normal purchase price Total Checkouts Full call number Barcode Date last seen Date last checked out Cost, replacement price Price effective from Koha item type
    Dewey Decimal Classification     BSDU Knowledge Resource Center, Jaipur BSDU Knowledge Resource Center, Jaipur General Stacks 01/17/2020 750.00 1 006.8 GRI 017989 10/15/2022 10/01/2022 750.00 01/17/2020 Books