Flask Web Development. Developing web applications with Python. 2nd Edition Год издания: 2018 Автор: Miguel Grinberg Издательство: O'REILLY ISBN: 978-1-491-99173-2 Серия: Developing web applications with Python Язык: Английский Формат: PDF Качество: Издательский макет или текст (eBook) Количество страниц: 318 Описание: 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. 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.
Примеры страниц
Оглавление
Preface Part I. Introduction to Flask 1. Installation Creating the Application Directory Virtual Environments Creating a Virtual Environment with Python Creating a Virtual Environment with Python Working with a Virtual Environment Installing Python Packages with pip 2. Basic Application Structure Initialization Routes and View Functions A Complete Application Development Web Server Dynamic Routes Debug Mode Command-Line Options The Request-Response Cycle Application and Request Contexts Request Dispatching The Request Object Request Hooks Responses Flask Extensions 3. Templates The Jinja2 Template Engine Rendering Templates Variables Control Structures Bootstrap Integration with Flask-Bootstrap Custom Error Pages Links Static Files Localization of Dates and Times with Flask-Moment8 4. Web Forms Configuration 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 Model Definition Relationships Database Operations Creating the Tables Inserting Rows Modifying Rows Deleting Rows Querying Rows Database Use in View Functions Integration with the Python Shell Database Migrations with Flask-Migrate Creating a Migration Repository Creating a Migration Script Upgrading the Database Adding More Migrations 6. Email Email Support with Flask-Mail Sending Email from the Python Shell Integrating Emails with the Application Sending Asynchronous Email 7. Large Application Structure Project Structure Configuration Options Application Package Using an Application Factory Implementing Application Functionality in a Blueprint Application Script Requirements File Unit Tests Database Setup Running the Application Part II. Example: A Social Blogging Application 8. User Authentication Authentication Extensions for Flask Password Security Hashing Passwords with Werkzeug Creating an Authentication Blueprint User Authentication with Flask-Login Preparing the User Model for Logins Protecting Routes Adding a Login Form Signing Users In Signing Users Out Understanding How Flask-Login Works Testing Logins New User Registration Adding a User Registration Form Registering New Users Account Confirmation Generating Confirmation Tokens with itsdangerous Sending Confirmation Emails Account Management 9. User Roles Database Representation of Roles Role Assignment Role Verification 10. User ProfilesProfile Information User Profile Page Profile Editor User-Level Profile Editor Administrator-Level Profile Editor User Avatars 11. Blog Posts Blog Post Submission and Display Blog Posts on Profile Pages Paginating Long Blog Post Lists Creating Fake Blog Post Data Rendering in Pages Adding a Pagination Widget Rich-Text Posts with Markdown and Flask-PageDown Using Flask-PageDown Handling Rich Text on the Server Permanent Links to Blog Posts Blog Post Editor 12. Followers Database Relationships Revisited Many-to-Many Relationships Self-Referential Relationships Advanced Many-to-Many Relationships Followers on the Profile Page Querying Followed Posts Using a Database Join Showing Followed Posts on the Home Page 13. User Comments Database Representation of Comments Comment Submission and Display Comment Moderation 14. Application Programming Interfaces Introduction to REST Resources Are Everything Request Methods Request and Response Bodies Versioning RESTful Web Services with Flask Creating an API Blueprint Error Handling User Authentication with Flask-HTTPAuth Token-Based Authentication08 Serializing Resources to and from JSON Implementing Resource Endpoints Pagination of Large Resource Collections Testing Web Services with HTTPie Part III. The Last Mile 15. Testing Obtaining Code Coverage Reports The Flask Test Client Testing Web Applications Testing Web Services 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 During Production Cloud Deployment The Heroku Platform Preparing the Application Testing with Heroku Local Deploying with git push Deploying an Upgrade Docker Containers Installing Docker Building a Container Image Running a Container Inspecting a Running Container Pushing Your Container Image to an External Registry Using an External Database Container Orchestration with Docker Compose Cleaning Up Old Containers and Images Using Docker in Production Traditional Deployments Server Setup Importing Environment Variables Setting Up Logging 18. Additional Resources Using an Integrated Development Environment (IDE) Finding Flask Extensions Getting Help Getting Involved with Flask Index
Developing web applications with Python - Miguel Grinberg - Flask Web Development. Developing web applications with Python. 2nd Edition [2018, PDF, ENG] download torrent for free and without registration
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum