Learning Flask Framework
暫譯: 學習 Flask 框架

Matt Copperwaite, Charles Leifer

  • 出版商: Packt Publishing
  • 出版日期: 2015-11-30
  • 售價: $2,000
  • 貴賓價: 9.5$1,900
  • 語言: 英文
  • 頁數: 250
  • 裝訂: Paperback
  • ISBN: 1783983361
  • ISBN-13: 9781783983360
  • 相關分類: Flask
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述


Build dynamic, data-driven websites and modern web applications with Flask


About This Book



  • Discover the most popular Flask resources on the web with ease

  • Familiarize yourself with third-party libraries commonly used with Flask

  • Create a fast, interactive, and secure web app with this hands-on guide


Who This Book Is For


This book is for anyone who wants to develop their knowledge of Python into something that can be used on the web. Flask follows the Python design principles and can be easily understood by anyone who knows Python, and even by those who do not.


What You Will Learn



  • Create your web pages to add modularity and flexibility to your web app using templates

  • Store and retrieve relational data using SQLAlchemy

  • Develop schema migrations with Alembic

  • Produce an admin section using flask-admin

  • Build RESTful APIs using Flask-Restless

  • Simulate requests and sessions using the Flask test client

  • Make Ajax requests from Jinja2 templates


In Detail


Flask is a small and powerful web development framework for Python. It does not presume or force a developer to use a particular tool or library. Flask supports extensions that can add application features as if they were implemented in Flask itself. Flask's main task is to build web applications quickly and with less code. With its lightweight and efficient web development framework, Flask combines rapid development and clean, simple design.


This book will take you through the basics of learning how to apply your knowledge of Python to the web.


Starting with the creation of a "Hello world" Flask app, you will be introduced to the most common Flask APIs and Flask's interactive debugger. You will learn how to store and retrieve blog posts from a relational database using an ORM and also to map URLs to views. Furthermore, you will walk through template blocks, inheritance, file uploads, and static assets.


You will learn to authenticate users, build log in/log out functionality, and add an administrative dashboard for the blog. Moving on, you will discover how to make Ajax requests from the template and see how the Mock library can simplify testing complex interactions.


Finally, you will learn to deploy Flask applications securely and in an automated, repeatable manner, and explore some of the most popular Flask resources on the web.

商品描述(中文翻譯)

建立動態、數據驅動的網站和現代網頁應用程式,使用 Flask

關於本書
- 輕鬆發現網路上最受歡迎的 Flask 資源
- 熟悉與 Flask 常用的第三方庫
- 使用這本實作指南創建快速、互動且安全的網頁應用程式

本書適合誰
本書適合任何想要將 Python 知識發展成可用於網路的讀者。Flask 遵循 Python 設計原則,任何了解 Python 的人都能輕鬆理解,甚至是那些不熟悉的人。

你將學到什麼
- 使用模板創建網頁,為你的網頁應用程式增加模組化和靈活性
- 使用 SQLAlchemy 儲存和檢索關聯數據
- 使用 Alembic 開發架構遷移
- 使用 flask-admin 產生管理區域
- 使用 Flask-Restless 建立 RESTful API
- 使用 Flask 測試客戶端模擬請求和會話
- 從 Jinja2 模板發送 Ajax 請求

詳細內容
Flask 是一個小型且強大的 Python 網頁開發框架。它不會假設或強迫開發者使用特定的工具或庫。Flask 支援擴展,可以像在 Flask 本身中實現的功能一樣添加應用程式特性。Flask 的主要任務是快速構建網頁應用程式,並且用更少的代碼來實現。憑藉其輕量且高效的網頁開發框架,Flask 結合了快速開發和乾淨、簡單的設計。

本書將帶你了解如何將 Python 知識應用於網路的基礎知識。

從創建一個「Hello world」Flask 應用程式開始,你將接觸到最常見的 Flask API 和 Flask 的互動除錯器。你將學習如何使用 ORM 儲存和檢索來自關聯數據庫的部落格文章,並將 URL 對應到視圖。此外,你將學習模板區塊、繼承、檔案上傳和靜態資源。

你將學會如何驗證用戶、建立登錄/登出功能,並為部落格添加管理儀表板。接下來,你將發現如何從模板發送 Ajax 請求,並了解 Mock 庫如何簡化複雜互動的測試。

最後,你將學會如何安全且自動化、可重複地部署 Flask 應用程式,並探索一些網路上最受歡迎的 Flask 資源。