Mastering Flask

Jack Stouffer

  • 出版商: Packt Publishing
  • 出版日期: 2015-09-30
  • 售價: $1,980
  • 貴賓價: 9.5$1,881
  • 語言: 英文
  • 頁數: 282
  • 裝訂: Paperback
  • ISBN: 1784393657
  • ISBN-13: 9781784393656
  • 相關分類: Flask
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Gain expertise in Flask to create dynamic and powerful web applications

About This Book

  • Work with scalable Flask application structures to create complex web apps
  • Discover the most powerful Flask extensions and learn how to create one
  • Deploy your application to real-world platforms using this step-by-step guide

Who This Book Is For

If you are a Flask user who knows the basics of the library and how to create basic web pages with HTML and CSS, and you want to take your applications to the next level, this is the book for you. Harnessing the full power of Flask will allow you to create complex web applications with ease.

What You Will Learn

  • Set up a best practices Python environment
  • Use SQLAlchemy to programmatically query a database
  • Develop templates in Jinja
  • Set up an MVC environment for Flask
  • Discover NoSQL, when to use it, when not to, and how to use it
  • Develop a custom Flask extension
  • Use Celery to create asynchronous tasks

In Detail

Flask is a library that allows programmers to create web applications in Python. Flask is a micro-framework that boasts a low learning curve, a large community, and the power to create complex web apps. However, Flask is easy to learn but difficult to master.

Starting from a simple Flask app, this book will walk through advanced topics while providing practical examples of the lessons learned. After building a simple Flask app, a proper app structure is demonstrated by transforming the app to use a Model-View-Controller (MVC) architecture. With a scalable structure in hand, the next chapters use Flask extensions to provide extra functionality to the app, including user login and registration, NoSQL querying, a REST API, an admin interface, and more. Next, you'll discover how to use unit testing to take the guesswork away from making sure the code is performing as it should. The book closes with a discussion of the different platforms that are available to deploy a Flask app on, the pros and cons of each one, and how to deploy on each one.

Style and approach

With plenty of useful examples, this guide introduces new concepts and then shows you how those concepts can be used in a real-world environment. Most sections are based around a single example app that is developed throughout the book.

商品描述(中文翻譯)

獲得 Flask 專業知識,創建動態且強大的網絡應用程式

關於本書
- 使用可擴展的 Flask 應用程式結構,創建複雜的網絡應用程式
- 探索最強大的 Flask 擴展並學習如何創建擴展
- 使用逐步指南將應用程式部署到實際平台

本書適合對 Flask 有基本了解並能使用 HTML 和 CSS 創建基本網頁的 Flask 用戶,如果你想將應用程式提升到更高水平,這本書適合你。充分利用 Flask 的強大功能,輕鬆創建複雜的網絡應用程式。

你將學到什麼
- 建立最佳實踐的 Python 環境
- 使用 SQLAlchemy 以程式方式查詢數據庫
- 在 Jinja 中開發模板
- 為 Flask 設置 MVC 環境
- 探索 NoSQL,何時使用,何時不使用以及如何使用
- 開發自定義的 Flask 擴展
- 使用 Celery 創建異步任務

詳細內容
Flask 是一個允許程序員使用 Python 創建網絡應用程式的庫。Flask 是一個微框架,具有低學習曲線、龐大的社區和創建複雜網絡應用程式的能力。然而,Flask 容易學習但難以精通。

從一個簡單的 Flask 應用程式開始,本書將通過實際示例介紹高級主題。在構建一個簡單的 Flask 應用程式之後,通過將應用程式轉換為使用模型-視圖-控制器(MVC)架構來演示正確的應用程式結構。有了可擴展的結構,接下來的章節使用 Flask 擴展為應用程式提供額外功能,包括用戶登錄和註冊、NoSQL 查詢、REST API、管理界面等。接下來,你將了解如何使用單元測試來確保代碼的正確性。本書最後討論了可用於部署 Flask 應用程式的不同平台,每個平台的優缺點以及如何在每個平台上部署。

風格和方法
本指南提供了豐富的實用示例,介紹新概念,並展示這些概念如何應用於實際環境。大多數章節都圍繞著一個示例應用程式展開,該應用程式在整本書中不斷發展。