万本电子书0元读

万本电子书0元读

顶部广告

Flask Framework Cookbook电子书

售       价:¥

20人正在读 | 0人评论 6.2

作       者:Shalabh Aggarwal

出  版  社:Packt Publishing

出版时间:2019-07-17

字       数:32.5万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Build state-of-the-art web applications quickly and efficiently using Flask and related technologies with Python 3 Key Features * Updated to Flask 1.0.3 and Python 3.7 with coverage of Microservices * Get the most out of the powerful Flask framework and maintain the flexibility of your design choices * Write cleaner and maintainable code with the help of sample apps Book Description Flask, the lightweight Python web framework, is popular due to its powerful modular design that lets you build scalable web apps. With this recipe-based guide, you’ll explore modern solutions and best practices for Flask web development. Updated to the latest version of Flask and Python 3, this second edition of Flask Framework Cookbook moves away from some of the old and obsolete libraries and introduces recipes on bleeding edge technologies. You’ll discover different ways of using Flask to create, deploy, and manage microservices. This Flask Python book starts by covering the different configurations that a Flask application can make use of, and then helps you work with templates and learn about the ORM and view layers. You’ll also be able to write an admin interface and get to grips with debugging and logging errors. Finally, you’ll grasp a variety of deployment and post-deployment techniques for platforms such as Apache, Tornado, and Heroku. By the end of this book, you’ll have gained all the knowledge you need to write Flask applications in the best possible way and scale them using standard industry practices. What you will learn * Explore web application development in Flask, right from installation to post-deployment stages * Make use of advanced templating and data modeling techniques * Discover effective debugging, logging, and error handling techniques in Flask * Integrate Flask with different technologies such as Redis, Sentry, and MongoDB * Deploy and package Flask applications with Docker and Kubernetes * Design scalable microservice architecture using AWS LambdaContinuous integration and Continuous deployment Who this book is for If you are a web developer who wants to learn more about developing scalable and production-ready applications in Flask, this is the book for you. You’ll also find this book useful if you are already aware of Flask's major extensions and want to use them for better application development. Basic Python programming experience along with basic understanding of Flask is assumed.
目录展开

About Packt

Why subscribe?

Contributors

About the author

About the reviewers

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Download the color images

Conventions used

Sections

Getting ready

How to do it…

How it works…

There's more…

See also

Get in touch

Reviews

Flask Configurations

Setting up our environment with virtualenv

How to do it...

How it works...

There's more...

See also

Handling basic configurations

Getting ready

How to do it...

How it works...

Configuring using class-based settings

How to do it...

How it works...

Organizing static files

How to do it...

How it works...

There's more...

Being deployment-specific with instance folders

How to do it...

How it works...

Composition of views and models

How to do it...

How it works...

See also

Creating a modular web app with blueprints

Getting ready

How to do it...

How it works...

See also

Making a Flask app installable using setuptools

How to do it...

How it works...

See also

Templating with Jinja2

Bootstrapping the recommended layout

Getting ready

How to do it...

How it works...

Implementing block composition and layout inheritance

Getting ready

How to do it...

How it works...

Creating a custom context processor

How to do it...

Creating a custom Jinja2 filter

How to do it...

How it works...

See also

Creating a custom macro for forms

Getting ready

How to do it...

Advanced date and time formatting

Getting ready

How to do it...

See more

Data Modeling in Flask

Creating an SQLAlchemy DB instance

Getting ready

How to do it...

There's more...

See also

Creating a basic product model

How to do it...

How it works...

See also

Creating a relational category model

How to do it...

See also

Migrating databases using Alembic and Flask-Migrate

Getting ready

How to do it...

How it works...

See also

Indexing model data with Redis

Getting ready

How to do it...

How it works...

Opting for the NoSQL way with MongoDB

Getting ready

How to do it...

See also

Working with Views

Writing function-based views and URL routes

Getting ready

How to do it...

A simple GET request

A simple POST request

A simple GET/POST request

How it works...

There's more...

Writing class-based views

Getting ready

How to do it...

How it works...

There's more...

See also

Implementing URL routing and product-based pagination

Getting ready

How to do it...

Adding pagination to applications

See also

Rendering to templates

Getting ready

How to do it...

How it works...

See also

Dealing with XHR requests

Getting ready

How to do it...

How it works...

Using decorators to handle requests beautifully

Getting ready

How to do it...

See also

Creating custom 404 and 500 handlers

Getting ready

How to do it...

How it works...

There's more...

Flashing messages for better user feedback

Getting ready

How to do it...

How it works...

Implementing SQL-based searching

Getting ready

How to do it...

How it works...

Webforms with WTForms

Representing SQLAlchemy model data as a form

Getting ready

How to do it...

How it works...

See also

Validating fields on the server side

How to do it...

How it works...

There's more...

See also

Creating a common forms set

How to do it...

How it works...

Creating custom fields and validation

How to do it...

How it works...

There's more...

Creating a custom widget

How to do it...

How it works...

See also

Uploading files via forms

How to do it...

How it works...

Protecting applications from cross-site request forgery (CSRF)

How to do it...

How it works...

Authenticating in Flask

Creating a simple session-based authentication

Getting ready

How to do it...

How it works...

See also

Authenticating using the Flask-Login extension

Getting ready

How to do it...

How it works...

There's more...

See also

Using Facebook for authentication

Getting started

How to do it...

How it works...

Using Google for authentication

Getting ready

How to do it...

How it works...

Using Twitter for authentication

Getting ready

How to do it...

How it works...

Authenticating with LDAP

Getting ready

How to do it...

How it works...

See also

RESTful API Building

Creating a class-based REST interface

Getting ready

How to do it...

How it works...

Creating an extension-based REST interface

Getting ready

How to do it...

How it works...

See also

Creating a complete RESTful API

Getting ready

How to do it...

How it works...

Admin Interface for Flask Apps

Creating a simple CRUD interface

Getting ready

How to do it...

How it works...

Using the Flask-Admin extension

Getting ready

How to do it...

How it works...

There's more...

Registering models with Flask-Admin

Getting ready

How to do it...

How it works...

Creating custom forms and actions

Getting ready

How to do it...

How it works...

Using a WYSIWYG editor for textarea integration

Getting ready

How to do it...

How it works...

See also

Creating user roles

Getting ready

How to do it...

How it works...

Internationalization and Localization

Adding a new language

Getting ready

How to do it...

How it works...

There's more...

See also

Implementing lazy evaluation and the gettext/ngettext functions

Getting ready

How to do it...

Implementing the global language switching action

Getting ready

How to do it...

How it works...

See also

Debugging, Error Handling, and Testing

Setting up basic file logging

Getting ready

How to do it...

How it works...

There's more...

See also

Sending emails on the occurrence of errors

Getting ready

How to do it...

How it works...

There's more...

Using Sentry to monitor exceptions

Getting ready

How to do it...

How it works...

Debugging with pdb

Getting ready

How to do it...

How it works...

See also

Creating our first simple test

Getting ready

How to do it...

How it works...

See also

Writing more tests for views and logic

Getting ready

How to do it...

How it works...

Nose library integration

Getting ready

How to do it...

See also

Using mocking to avoid real API access

Getting ready

How to do it...

How it works...

See also

Determining test coverage

Getting ready

How to do it...

How it works...

See also

Using profiling to find bottlenecks

Getting ready

How to do it...

How it works...

Deployment and Post-Deployment

Deploying with Apache

Getting ready

How to do it...

How it works...

There's more...

See also

Deploying with uWSGI and Nginx

Getting ready

How to do it...

See also

Deploying with Gunicorn and Supervisor

Getting ready

How to do it...

How it works...

See also

Deploying with Tornado

Getting ready

How to do it...

How it works...

Using S3 storage for file uploads

Getting ready

How to do it...

How it works...

See also

Deploying with Heroku

Getting ready

How to do it...

How it works...

There's more...

Deploying with AWS Elastic Beanstalk

Getting ready

How to do it...

How it works...

Managing and monitoring application performance with New Relic

Getting ready

How to do it...

How it works...

See also

Microservices and Containers

Containerization with Docker

Getting ready

How to do it...

How it works...

See also

Orchestrating containers with Kubernetes

Getting ready

How to do it...

How it works...

There's more...

See also

Going serverless with Zappa on AWS Lambda

Getting ready

How to do it...

How it works...

See also

Other Tips and Tricks

Implementing full-text search with Whoosh

Getting ready

How to do it...

How it works...

See also

Implementing full-text search with Elasticsearch

Getting ready

How to do it...

How it works...

Working with signals

Getting ready

How to do it...

How it works...

See also

Using caching with your application

Getting ready

How to do it...

How it works...

There's more...

See also

Implementing email support for Flask applications

Getting ready

How to do it...

How it works...

There's more...

See also

Understanding asynchronous operations

Getting ready

How to do it...

How it works...

Working with Celery

Getting ready

How to do it...

How it works...

See also

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 2个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部