High-Performance Web Apps with FastAPI: The Asynchronous Web Framework Based on Modern Python
暫譯: 使用 FastAPI 開發高效能網頁應用程式:基於現代 Python 的非同步網頁框架

Lathkar, Malhar

  • 出版商: Apress
  • 出版日期: 2023-03-28
  • 售價: $2,200
  • 貴賓價: 9.5$2,090
  • 語言: 英文
  • 頁數: 309
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1484291778
  • ISBN-13: 9781484291771
  • 相關分類: Python程式語言
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

 

Build APIs and web apps based on Asynchronous Server Gateway Interface (ASGI). This book provides a comprehensive explanation of using Pydantic models to construct the request/response objects in a FASTAPI path operation.

 

You'll start by reviewing type hints in Python and the asynchronous processing concepts. One of the highlights of FastAPI is its auto generation of API docs. Pydantic library is the main pillar on top of which FastAPI is built. You'll see that ASGI has a far better performance compared to most of the other popular Python frameworks as they implement Web server Gateway Interface (WSGI), which is synchronous in nature and hence having slower response time.

This book thoroughly explains how FastAPI interacts asynchronously with relational as well as NOSQL databases. Modern web apps use template engines to interact with the front-end. In this book, you will learn to use jinja2 templates and static assets. Swagger UI and OpenAPI standards are also covered in detail. Finally, different options of deployment of FastAPI app have been explored in this book.

This book uses practical examples to empower you to build high performance APIs

 

What You'll Learn

 

  • Develop robust and high-performance web apps
  • Deploy the FastAPI app for public availability using cloud services such as Deta and Docker container
  • Understand the important building blocks of a web app such as form handling, templating and database interaction

 

 

Who This Book Is For

Aspiring and the experienced Python developers looking to leverage the flexibility of Python and the powerful features introduced in Modern Python. Computer science Engineering students at graduate and postgraduate level will also benefit immensely from the practical approach adapted in the book.

 

商品描述(中文翻譯)

建立基於非同步伺服器網關介面(Asynchronous Server Gateway Interface, ASGI)的 API 和網頁應用程式。本書提供了使用 Pydantic 模型來構建 FASTAPI 路徑操作中的請求/回應物件的全面解釋。

您將首先回顧 Python 中的類型提示和非同步處理概念。FastAPI 的一個亮點是其自動生成 API 文檔。Pydantic 函式庫是 FastAPI 建立的主要支柱。您將看到 ASGI 相較於大多數其他流行的 Python 框架(這些框架實現了同步的網頁伺服器網關介面(Web Server Gateway Interface, WSGI))具有更好的性能,因為 WSGI 的本質是同步,因此響應時間較慢。

本書詳細解釋了 FastAPI 如何與關聯式和 NoSQL 數據庫進行非同步互動。現代網頁應用程式使用模板引擎與前端互動。在本書中,您將學習使用 jinja2 模板和靜態資源。Swagger UI 和 OpenAPI 標準也將詳細介紹。最後,本書探討了 FastAPI 應用程式的不同部署選項。

本書使用實際範例來幫助您建立高性能的 API。

您將學到的內容:

- 開發穩健且高性能的網頁應用程式
- 使用雲服務(如 Deta 和 Docker 容器)部署 FastAPI 應用程式以供公眾使用
- 理解網頁應用程式的重要組成部分,如表單處理、模板化和數據庫互動

本書的讀者對象:

有志於和經驗豐富的 Python 開發者,希望利用 Python 的靈活性和現代 Python 中引入的強大功能。計算機科學工程的研究生和碩士生也將從本書所採用的實用方法中獲益良多。

作者簡介

Malhar Lathkar is an independent developer, trainer, technical writer and author with over 30 years of experience. He holds a postgraduate degree in Electronics. After a brief stint as a degree college lecturer, he started his own software training and development institute. Over the years, he has gained proficiency in various programming technologies and imparted training to thousands of students and professionals from India and different countries around the world. Malhar also offers software training services to corporates. He has been associated with many EdTech companies as a freelance Subject Matter Expert. He has written a few books that have been published by well-known publishing houses.

 

作者簡介(中文翻譯)

Malhar Lathkar 是一位獨立開發者、培訓師、技術作家和作者,擁有超過 30 年的經驗。他擁有電子學的研究生學位。在短暫擔任大學講師後,他創辦了自己的軟體培訓和開發機構。多年來,他在各種程式設計技術方面獲得了專業知識,並為來自印度及世界各地的數千名學生和專業人士提供培訓。Malhar 也為企業提供軟體培訓服務。他曾作為自由職業的主題專家與多家 EdTech 公司合作。他撰寫了幾本由知名出版社出版的書籍。