FastAPI: Modern Python Web Development (First Early Release) Bill Lubanovic instant download
FastAPI: Modern Python Web Development (First Early Release) Bill Lubanovic instant download
https://ebookmeta.com/product/fastapi-modern-python-web-
development-first-early-release-bill-lubanovic/
https://ebookmeta.com/product/fastapi-modern-python-web-
development-1st-edition-bill-lubanovic/
https://ebookmeta.com/product/high-performance-web-apps-with-
fastapi-the-asynchronous-web-framework-based-on-modern-
python-1st-edition-malhar-lathkar/
https://ebookmeta.com/product/high-performance-web-apps-with-
fastapi-the-asynchronous-web-framework-based-on-modern-
python-1st-edition-malhar-lathkar-2/
https://ebookmeta.com/product/nano-catalyst-for-energy-
applications-1st-edition-rohit-srivastava/
Blue 42 Hail Mary Duet 1 1st Edition C A Rene
https://ebookmeta.com/product/blue-42-hail-mary-duet-1-1st-
edition-c-a-rene/
https://ebookmeta.com/product/an-uneasy-solitude-individual-and-
society-in-the-work-of-ralph-waldo-emerson-maurice-gonnaud/
https://ebookmeta.com/product/rape-myths-understanding-assessing-
and-preventing-1st-edition-sofia-persson/
https://ebookmeta.com/product/the-spark-of-learning-energizing-
the-college-classroom-with-the-science-of-emotion-1st-edition-
sarah-rose-cavanagh/
https://ebookmeta.com/product/autonomous-and-connected-vehicles-
network-architectures-from-legacy-networks-to-automotive-
ethernet-1st-edition-dominique-paret/
Becoming a Supply Chain Leader Mastering and Executing
the Fundamentals 1st Edition Sourya Datta (Editor)
https://ebookmeta.com/product/becoming-a-supply-chain-leader-
mastering-and-executing-the-fundamentals-1st-edition-sourya-
datta-editor/
FastAPI
FIRST EDITION
Bill Lubanovic
FastAPI
by Bill Lubanovic
Copyright © 2023 Bill Lubanovic. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc. , 1005 Gravenstein Highway North,
Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales
promotional use. Online editions are also available for most titles (
http://oreilly.com ). For more information, contact our
corporate/institutional sales department: 800-998-9938 or
[email protected] .
Constant width
Used for program listings, as well as within paragraphs to refer to
program elements such as variable or function names, databases,
data types, environment variables, statements, and keywords.
TIP
This element signifies a tip or suggestion.
NOTE
This element signifies a general note.
WARNING
This element indicates a warning or caution.
NOTE
For more than 40 years, O’Reilly Media has provided technology and
business training, knowledge, and insight to help companies succeed.
How to Contact Us
Please address comments and questions concerning this book to the
publisher:
Sebastopol, CA 95472
707-829-0104 (fax)
We have a web page for this book, where we list errata, examples,
and any additional information.
Email [email protected] to comment or ask technical
questions about this book.
For news and information about our books and courses, visit
https://oreilly.com.
Find us on LinkedIn: https://linkedin.com/company/oreilly-media
Follow us on Twitter: https://twitter.com/oreillymedia
Watch us on YouTube: https://www.youtube.com/oreillymedia
Acknowledgments
Part I. What’s New?
The world has benefited greatly from the invention of the World
Wide Web by Sir Tim Berners-Lee1, and the Python programming
language by Guido van Rossum.
The only tiny problem is that a nameless computer book publisher
often puts spiders and snakes on its relevant Web and Python
covers. If only the Web had been named the World Wide Woof
(cross-threads in weaving, also called weft), and Python were Pooch,
this book might have had a cover like this:
But I digress2.
This book is about:
1 I actually shook his hand once. I didn’t wash mine for a month, but I’ll bet
he did right away.
2 Not for the last time.
Chapter 1. The Modern Web
The Web as I envisaged it, we have not seen it yet. The future is
still so much bigger than the past.
—Tim Berners-Lee
Preview
Once upon a time, the web was small and simple. Developers had
such fun throwing PHP, HTML, and MySQL calls into single files and
proudly telling everyone to check out their website. But the web
grew over time to zillions, nay, squillions of pages — and the early
playground became a metaverse of theme parks.
In this chapter, I’ll point out some areas that have become ever
more relevant to the modern web:
Services and APIs
Concurrency
Layers
Data
The next chapter will show what Python offers in these areas. After
that, we’ll dive into the FastAPI web framework and see what it has
to offer.
Kinds of APIs
Each API defines some:
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.