Movatterモバイル変換


[0]ホーム

URL:


Packt
Search iconClose icon
Search icon CANCEL
Subscription
0
Cart icon
Your Cart(0 item)
Close icon
You have no products in your basket yet
Save more on your purchases!discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Profile icon
Account
Close icon

Change country

Modal Close icon
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timerSALE ENDS IN
0Days
:
00Hours
:
00Minutes
:
00Seconds
Home> Web Development> Web Services> Building Python Web APIs with FastAPI
Building Python Web APIs with FastAPI
Building Python Web APIs with FastAPI

Building Python Web APIs with FastAPI: A fast-paced guide to building high-performance, robust web APIs with very little boilerplate code

Arrow left icon
Profile Icon Abdulazeez
Arrow right icon
€31.99
Full star iconFull star iconFull star iconFull star iconHalf star icon4.7(9 Ratings)
PaperbackJul 2022216 pages1st Edition
eBook
€8.98 €25.99
Paperback
€31.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€8.98 €25.99
Paperback
€31.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature iconInstant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature iconDRM FREE - Read whenever, wherever and however you want
Product feature iconAI Assistant (beta) to help accelerate your learning

Contact Details

Modal Close icon
Payment Processing...
tickCompleted

Shipping Address

Billing Address

Shipping Methods
Table of content iconView table of contentsPreview book icon Preview Book

Building Python Web APIs with FastAPI

Chapter 1: Getting Started with FastAPI

FastAPI is the Python web framework that we are going to use in this book. It is a fast, lightweight modern API and has an easier learning curve when compared to other Python-based web frameworks, such as Flask and Django. FastAPI is relatively new, but it has a growing community. It is used extensively in building web APIs and in deploying machine learning models.

In the first chapter, you will learn how to set up your development environment and build your first FastAPI application. You will begin by learning the basics ofGit – a version control system – to equip you with the knowledge of storing, tracking, and retrieving file changes as you build your application. You will also learn how to handle packages in Python using pip, how to create isolated development environments withVirtualenv, and the basics ofDocker. Lastly, you will be introduced to the basics of FastAPI by building a simpleHello World application.

An understanding of the technologies previously mentioned is required to build a full-blown FastAPI application. It also serves as an addition to your current skillset.

At the completion of this chapter, you will be able to set up and use Git, install and manage packages using pip, create an isolated development environment with Virtualenv, use Docker, and most importantly, scaffold a FastAPI application.

This chapter covers the following topics:

  • Git basics
  • Creating isolated development environments with Virtualenv
  • Package management with pip
  • Setting up and learning the basics of Docker
  • Building a simple FastAPI application

Technical Requirement

Git basics

Git is a version control system that enables developers to record, keep track, and revert to earlier versions of files. It is a decentralized and lightweight tool that can be installed on any operating system.

You will be learning how to use Git for record-keeping purposes. As each layer of the application is being built, changes will be made, and it’s important that these changes are kept note of.

Installing Git

To install Git, visit the downloads page athttps://git-scm.com/downloads and select a download option for your current operating system. You’ll be redirected to an instructional page on how to install Git on your machine.

It is also worth noting that Git comes as aCLI and aGUI application. Therefore, you can download the one that works best for you.

Git operations

As mentioned earlier, Git can be used to record, track, and revert to earlier versions of a file. However, only the basic operations of Git will be used in this book and will be introduced in this section.

In order for Git to run properly, folders housing files must be initialized. Initializing folders enables Git to keep track of the content except otherwise exempted.

To initialize a new Git repository in your project, you need to run the following command in your terminal:

$ git init

To enable tracking of files, a file must first be added and committed. A Git commit enables you to track file changes between timeframes; for example, a commit made an hour ago and the current file version.

What Is a Commit?

A commit is a unique capture of a file or folder status at a particular time, and it is identified by a unique code.

Now that we know what a commit is, we can go ahead and commit a file as follows:

$ git add hello.txt$ git commit -m "Initial commit"

You can track the status of your files after making changes by running the following command:

$ git status

Your terminal should look similar to the following:

Figure 1.1 – Git commands

Figure 1.1 – Git commands

To view the changes made to the file, which can be additions or subtractions from the file contents, run the following command:

$ git diff

Your terminal should look similar to the following:

Figure 1.2 – Output from the git diff command

Figure 1.2 – Output from the git diff command

It is good practice to include a.gitignore file in every folder. The.gitignore file contains the names of filesand folders to be ignored by Git. This way, you can add and commit all the files in your folder without the fear of committing files like.env.

To include a.gitignore file, run the following command in your terminal:

$ touch .gitignore

To exempt a file from being tracked by Git, add it to the.gitignore file as follows:

$ echo ".env" >> .gitignore

Common files contained in a.gitignore file include the following:

  • Environment files (*.env)
  • Virtualenv folder (env, venv)
  • IDE metadata folders (such as.vscode and.idea)

Git branches

Branches are an important feature that enables developers to easily work on different application features, bugs, and so on, separately before merging into the main branch. The system of branching is employed in both small-scale and large-scale applications and promotes the culture of previewing and collaborations via pull requests. The primary branch is called the main branch and it is the branch from which other branches are created.

To create a new branch from an existing branch, we run thegit checkout -b newbranch command. Let’s create a new branch by running the following command:

$ git checkout -b hello-python-branch

The preceding command creates a new branch from the existing one, and then sets the active branch to the newly created branch. To switch back to the originalmain branch, we rungit checkout main as follows:

$ git checkout main

Important Note

Runninggit checkout main makesmain the active working branch, whereasgit checkout -b newbranch creates a new branch from the current working branch and sets the newly created branch as the active one.

To learn more, refer to the Git documentation:http://www.git-scm.com/doc.

Now that we have learned the basics of Git, we can now proceed to learn about how to create isolated environments withvirtualenv.

Creating isolated development environments with Virtualenv

The traditional approach to developing applications in Python is to isolate these applications in a virtual environment. This is done to avoid installing packages globally and reduce conflicts during application development.

A virtual environment is an isolated environment where application dependencies installed can only be accessed within it. As a result, the application can only access packages and interact only within this environment.

Creating a virtual environment

By default, thevenv module from the standard library is installed in Python3. Thevenv module is responsible for creating a virtual environment. Let’s create atodos folder and create a virtual environment in it by running the following commands:

$ mkdir todos && cd todos$ python3 -m venv venv

Thevenv module takes an argument, which is the name of the folder where the virtual environment should be installed into. In our newly created virtual environment, a copy of the Python interpreter is installed in thelib folder, and the files enabling interactions within the virtual environment are stored in thebin folder.

Activating and deactivating the virtual environment

To activate a virtual environment, we run the following command:

$ source venv/bin/activate

The preceding command instructs your shell to use the virtual environment’s interpreter and packages by default. Upon activating the virtual environment, a prefix of thevenv virtual environment folder is added before the prompt as follows:

Figure 1.3 – Prefixed prompt

Figure 1.3 – Prefixed prompt

To deactivate a virtual environment, thedeactivate command is run in the prompt. Running the command immediately exits the isolated environment and the prefix is removed as follows:

Figure 1.4 – Deactivating a virtual environment

Figure 1.4 – Deactivating a virtual environment

Important Note

You can also create a virtual environment and manage application dependencies usingPipenv andPoetry.

Now that we have created the virtual environment, we can now proceed to understand how package management withpip works.

Package management with pip

A FastAPI application constitutes packages, therefore you will be introduced to package management practices, such as installing packages, removing packages, and updating packages for your application.

Installing packages from the source can turn out to be a cumbersome task as, most of the time, it involves downloading and unzipping.tar.gz files before manual installation. In a scenario where a hundred packages are to be installed, this method becomes inefficient. Then, how do you automate this process?

Pip is a Python package manager like JavaScript’syarn; it enables you to automate the process of installing Python packages – both globally and locally.

Installing pip

Pip is automatically installed during a Python installation. You can verify whether pip is installed by running the following command in your terminal:

$ python3 -m pip list

The preceding command should return a list of packages installed. The output should be similar to the following figure:

Figure 1.5 – List of installed Python packages

Figure 1.5 – List of installed Python packages

If the command returns an error, follow the instructions athttps://pip.pypa.io/en/stable/installation/ to install pip.

Basic commands

Withpip installed, let’s learn its basic commands. To install theFastAPI package with pip, we run the following command:

$ pip install fastapi

On a Unix operating system, such as Mac or Linux, in some cases, thesudo keyword is prepended to install global packages.

To uninstall a package, the following command is used:

$ pip uninstall fastapi

To collate the current packages installed in a project into a file, we use the followingfreeze command:

$ pip freeze > requirements.txt

The> operator tells bash to save the output from the command into therequirements.txt file. This means that runningpip freeze returns an output of all the currently installed packages.

To install packages from a file such as therequirements.txt file, the following command is used:

$ pip install -r requirements.txt

The preceding command is mostly used in deployment.

Now that you have learned the basics of pip and have gone over some basic commands, let’s learn the basics ofDocker.

Setting up Docker

As our application grows into having multiple layers, such as a database, coupling the application into a single piece enables us to deploy our application. We’ll be usingDocker to containerize our application layers into a single image, which can then be easily deployed locally or in the cloud.

Additionally, using a Dockerfile and a docker-compose file eliminates the need to upload and share images of our applications. New versions of our applications can be built from the Dockerfile and deployed using the docker-compose file. Application images can also be stored and retrieved fromDocker Hub. This is known as a push and pull operation.

To begin setting up, download and install Docker fromhttps://docs.docker.com/install.

Dockerfile

A Dockerfile contains instructions on how our application image is to be built. The following is an example Dockerfile:

FROM PYTHON:3.8# Set working directory to /usr/src/appWORKDIR /usr/src/app# Copy the contents of the current local directory into the container's working directoryADD . /usr/src/app# Run a commandCMD ["python", "hello.py"]

Next, we’ll build the application container image and tag itgetting_started as follows:

$ docker build -t getting_started .

If the Dockerfile isn’t present in the directory where the command is being run, the path to the Dockerfile should be properly appended as follows:

$ docker build -t api api/Dockerfile

The container image can be run using the following command:

$ docker run getting-started

Docker is an efficient tool for containerization. We have only looked at the basic operations and we’ll learn more operations practically inChapter 9,Deploying FastAPI Applications.

Building a simple FastAPI application

Finally, we can now get to our first FastAPI project. Our aim in this section is to introduce FastAPI by building a simple application. We shall cover in-depth operations in subsequent chapters.

We’ll begin by installing the dependencies required for our application in thetodos folder we created earlier. The dependencies are the following:

  • fastapi: The framework on which we’ll build our application.
  • uvicorn: An Asynchronous Server Gateway Interface module to run our application.

First, activate your development environment by running the following command in your project directory:

$ source venv/bin/activate

Then, install the dependencies as follows:

(venv)$ pip install fastapi uvicorn

For now, we’ll create a newapi.py file and create a new instance of FastAPI as follows:

from fastapi import FastAPIapp = FastAPI()

By instantiating FastAPI in the app variable, we can proceed to create routes. Let’s create a welcome route.

A route is created by first defining a decorator to indicate the type of operation, followed by a function containing the operation to be carried out when this route is invoked. In the following example, we’ll create a"/" route that only acceptsGET requests and returns a welcome message when visited:

@app.get("/")async def welcome() -> dict:    return { "message": "Hello World"}

The next step is to start our application usinguvicorn. In your terminal, run the following command:

(venv)$ uvicorn api:app --port 8000 --reload

In the preceding command,uvicorn takes the following arguments:

  • file:instance: The file containing the instance of FastAPI and the name variable holding the FastAPI instance.
  • --port PORT: The port the application will be served on.
  • --reload: An optional argument included to restart the application on every file change.

The command returns the following output:

(venv) ➜  todos uvicorn api:app --port 8080 --reloadINFO:     Will watch for changes in these directories: ['/Users/youngestdev/Documents/todos']INFO:     Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)INFO:     Started reloader process [3982] using statreloadINFO:     Started server process [3984]INFO:     Waiting for application startup.INFO:     Application startup complete.

The next step is to test the application by sending aGET request to the API. In a new terminal, send aGET request usingcurl as follows:

$ curl http://0.0.0.0:8080/

The response from the application logged in your console will be the following:

{"message":"Hello World"}

Summary

In this chapter, we have learned how to install the tools required to set up our development environment. We have also built a simple API as an introduction to FastAPI and learned how to create a route in the process.

In the next chapter, you will be introduced to routing in FastAPI. First, you will be introduced to the process of building models to validate request payloads and responses using Pydantic. You will then learn about Path and Query parameters as well as request body, and finally, you will learn how to build a CRUD todo application.

Left arrow icon

Page1 of 8

Right arrow icon
Download code iconDownload Code

Key benefits

  • A practical guide to developing production-ready web APIs rapidly in Python
  • Learn how to put FastAPI into practice by implementing it in real-world scenarios
  • Explore FastAPI, its syntax, and configurations for deploying applications

Description

RESTful web services are commonly used to create APIs for web-based applications owing to their light weight and high scalability. This book will show you how FastAPI, a high-performance web framework for building RESTful APIs in Python, allows you to build robust web APIs that are simple and intuitive and makes it easy to build quickly with very little boilerplate code.This book will help you set up a FastAPI application in no time and show you how to use FastAPI to build a REST API that receives and responds to user requests. You’ll go on to learn how to handle routing and authentication while working with databases in a FastAPI application. The book walks you through the four key areas: building and using routes for create, read, update, and delete (CRUD) operations; connecting the application to SQL and NoSQL databases; securing the application built; and deploying your application locally or to a cloud environment.By the end of this book, you’ll have developed a solid understanding of the FastAPI framework and be able to build and deploy robust REST APIs.

Who is this book for?

This book is for Python developers who want to learn FastAPI in a pragmatic way to create robust web APIs with ease. If you are a Django or Flask developer looking to try something new that's faster, more efficient, and produces fewer bugs, this FastAPI Python book is for you. The book assumes intermediate-level knowledge of Python programming.

What you will learn

  • Set up a FastAPI application that is fully functional and secure
  • Understand how to handle errors from requests and send proper responses in FastAPI
  • Integrate and connect your application to a SQL and NoSQL (MongoDB) database
  • Perform CRUD operations using SQL and FastAPI
  • Manage concurrency in FastAPI applications
  • Implement authentication in a FastAPI application
  • Deploy a FastAPI application to any platform
Estimated delivery feeDeliver to Belgium

Premium delivery7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date :Jul 29, 2022
Length:216 pages
Edition :1st
Language :English
ISBN-13 :9781801076630
Languages :
Concepts :
Tools :

What do you get with Print?

Product feature iconInstant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature iconDRM FREE - Read whenever, wherever and however you want
Product feature iconAI Assistant (beta) to help accelerate your learning

Contact Details

Modal Close icon
Payment Processing...
tickCompleted

Shipping Address

Billing Address

Shipping Methods
Estimated delivery feeDeliver to Belgium

Premium delivery7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Publication date :Jul 29, 2022
Length:216 pages
Edition :1st
Language :English
ISBN-13 :9781801076630
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99billed monthly
Feature tick iconUnlimited access to Packt's library of 7,000+ practical books and videos
Feature tick iconConstantly refreshed with 50+ new titles a month
Feature tick iconExclusive Early access to books as they're written
Feature tick iconSolve problems while you work with advanced search and reference features
Feature tick iconOffline reading on the mobile app
Feature tick iconSimple pricing, no contract
€189.99billed annually
Feature tick iconUnlimited access to Packt's library of 7,000+ practical books and videos
Feature tick iconConstantly refreshed with 50+ new titles a month
Feature tick iconExclusive Early access to books as they're written
Feature tick iconSolve problems while you work with advanced search and reference features
Feature tick iconOffline reading on the mobile app
Feature tick iconChoose a DRM-free eBook or Video every month to keep
Feature tick iconPLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick iconExclusive print discounts
€264.99billed in 18 months
Feature tick iconUnlimited access to Packt's library of 7,000+ practical books and videos
Feature tick iconConstantly refreshed with 50+ new titles a month
Feature tick iconExclusive Early access to books as they're written
Feature tick iconSolve problems while you work with advanced search and reference features
Feature tick iconOffline reading on the mobile app
Feature tick iconChoose a DRM-free eBook or Video every month to keep
Feature tick iconPLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick iconExclusive print discounts

Frequently bought together


Full Stack FastAPI, React, and MongoDB
Full Stack FastAPI, React, and MongoDB
Read more
Sep 2022336 pages
Full star icon3.8 (5)
eBook
eBook
€8.98€25.99
€31.99
Building Python Web APIs with FastAPI
Building Python Web APIs with FastAPI
Read more
Jul 2022216 pages
Full star icon4.7 (9)
eBook
eBook
€8.98€25.99
€31.99
Building Python Microservices with FastAPI
Building Python Microservices with FastAPI
Read more
Aug 2022420 pages
Full star icon4 (8)
eBook
eBook
€8.98€28.99
€35.99
Stars icon
Total99.97
Full Stack FastAPI, React, and MongoDB
€31.99
Building Python Web APIs with FastAPI
€31.99
Building Python Microservices with FastAPI
€35.99
Total99.97Stars icon
Buy 2+ to unlock€6.99 prices - master what's next.
SHOP NOW

Table of Contents

13 Chapters
Part 1: An Introduction to FastAPIChevron down iconChevron up icon
Part 1: An Introduction to FastAPI
Chapter 1: Getting Started with FastAPIChevron down iconChevron up icon
Chapter 1: Getting Started with FastAPI
Technical Requirement
Git basics
Creating isolated development environments with Virtualenv
Package management with pip
Setting up Docker
Building a simple FastAPI application
Summary
Chapter 2: Routing in FastAPIChevron down iconChevron up icon
Chapter 2: Routing in FastAPI
Technical requirements
Understanding routing in FastAPI
Routing with the APIRouter class
Validating request bodies using Pydantic models
Path and query parameters
Request body
Building a simple CRUD app
Summary
Chapter 3: Response Models and Error HandlingChevron down iconChevron up icon
Chapter 3: Response Models and Error Handling
Technical requirements
Understanding responses in FastAPI
Building response models
Error handling
Summary
Chapter 4: Templating in FastAPIChevron down iconChevron up icon
Chapter 4: Templating in FastAPI
Technical requirements
Understanding Jinja
Using Jinja templates in FastAPI
Summary
Part 2: Building and Securing FastAPI ApplicationsChevron down iconChevron up icon
Part 2: Building and Securing FastAPI Applications
Chapter 5: Structuring FastAPI ApplicationsChevron down iconChevron up icon
Chapter 5: Structuring FastAPI Applications
Technical requirements
Structuring in FastAPI applications
Summary
Chapter 6: Connecting to a DatabaseChevron down iconChevron up icon
Chapter 6: Connecting to a Database
Technical requirements
Setting up SQLModel
Creating a database
Setting up MongoDB
CRUD operations
Summary
Chapter 7: Securing FastAPI ApplicationsChevron down iconChevron up icon
Chapter 7: Securing FastAPI Applications
Technical requirements
Authentication methods in FastAPI
Securing the application with OAuth2 and JWT
Updating the application
Configuring CORS
Summary
Part 3: Testing And Deploying FastAPI ApplicationsChevron down iconChevron up icon
Part 3: Testing And Deploying FastAPI Applications
Chapter 8: Testing FastAPI ApplicationsChevron down iconChevron up icon
Chapter 8: Testing FastAPI Applications
Technical requirements
Unit testing with pytest
Setting up our test environment
Writing tests for REST API endpoints
Test coverage
Summary
Chapter 9: Deploying FastAPI ApplicationsChevron down iconChevron up icon
Chapter 9: Deploying FastAPI Applications
Technical requirements
Preparing for deployment
Deploying with Docker
Deploying Docker images
Summary
Why subscribe?
Other Books You May EnjoyChevron down iconChevron up icon
Other Books You May Enjoy
Packt is searching for authors like you
Share Your Thoughts

Recommendations for you

Left arrow icon
Full-Stack Flask and React
Full-Stack Flask and React
Read more
Oct 2023408 pages
Full star icon3.8 (5)
eBook
eBook
€8.98€23.99
€29.99
C# 13 and .NET 9 – Modern Cross-Platform Development Fundamentals
C# 13 and .NET 9 – Modern Cross-Platform Development Fundamentals
Read more
Nov 2024828 pages
Full star icon4.3 (4)
eBook
eBook
€8.98€35.99
€44.99
Real-World Web Development with .NET 9
Real-World Web Development with .NET 9
Read more
Dec 2024578 pages
Full star icon3.5 (4)
eBook
eBook
€8.98€29.99
€37.99
Django 5 By Example
Django 5 By Example
Read more
Apr 2024826 pages
Full star icon4.6 (36)
eBook
eBook
€8.98€29.99
€37.99
React and React Native
React and React Native
Read more
Apr 2024518 pages
Full star icon4.2 (9)
eBook
eBook
€8.98€26.99
€32.99
Scalable Application Development with NestJS
Scalable Application Development with NestJS
Read more
Jan 2025614 pages
Full star icon4.5 (6)
eBook
eBook
€8.98€23.99
€29.99
C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals
C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals
Read more
Nov 2023828 pages
Full star icon4.3 (61)
eBook
eBook
€8.98€35.99
€44.99
Responsive Web Design with HTML5 and CSS
Responsive Web Design with HTML5 and CSS
Read more
Sep 2022504 pages
Full star icon4.5 (56)
eBook
eBook
€8.98€35.99
€44.99
Modern Full-Stack React Projects
Modern Full-Stack React Projects
Read more
Jun 2024506 pages
Full star icon4.8 (9)
eBook
eBook
€8.98€26.99
€33.99
Learning Angular
Learning Angular
Read more
Jan 2025494 pages
Full star icon4.1 (7)
eBook
eBook
€8.98€26.99
€33.99
Right arrow icon

Customer reviews

Top Reviews
Rating distribution
Full star iconFull star iconFull star iconFull star iconHalf star icon4.7
(9 Ratings)
5 star77.8%
4 star11.1%
3 star11.1%
2 star0%
1 star0%
Filter icon Filter
Top Reviews

Filter reviews by




AaaaaooooobreeAug 31, 2022
Full star iconFull star iconFull star iconFull star iconFull star icon5
I loved how easy it was to read and how the code is written and explained throughout the book. I can't wait to apply more of it in a practical application and see where it goes from there. Definitively worth checking out.It even goes over git and how to do pip installs. So, there is information here that's useful all the way from new user to an experienced user.
Amazon Verified reviewAmazon
gokulSep 26, 2023
Full star iconFull star iconFull star iconFull star iconFull star icon5
I like the parts where the apps are integrated with databases. Firstly with sqlclient and then with mongodb.At the end, deployment with docker is covered all. Overall, i have gained confidence with fastapi fastly.Appreciate the author.
Amazon Verified reviewAmazon
Luiz Eduardo FonsecaAug 22, 2022
Full star iconFull star iconFull star iconFull star iconFull star icon5
The book is very well-structured. It takes the reader from the basic aspects of building an API like routing, connecting to Databases, authenticating etc. But then it also takes to more advanced topics, like testing, advanced error handling, and container deployment. All in all, it achieves what it sets out to do with great mastery, and then some.
Amazon Verified reviewAmazon
KOct 06, 2023
Full star iconFull star iconFull star iconFull star iconFull star icon5
Kurz und knackig.Inhaltlich viel besser als das andere Buch zu FastAPI von Packt.Es werden auch einige best practices erwähnt.
Amazon Verified reviewAmazon
Pablo MorenoAug 05, 2022
Full star iconFull star iconFull star iconFull star iconFull star icon5
I got this book just couple of weeks ago, and it is very well written. It has many practical examples and written in simple language.To get the most of the content, it is important that you have some experience working with Python (some, but no need to be a Python expert).The concepts around API are focused on how to put products in production quickly with FastAPI, regardless of your knowledge and experience working with APIs.If you want to start understanding how API works, this book is definitely for you.
Amazon Verified reviewAmazon
  • Arrow left icon Previous
  • 1
  • 2
  • Arrow right icon Next

People who bought this also bought

Left arrow icon
C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals
C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals
Read more
Nov 2023828 pages
Full star icon4.3 (61)
eBook
eBook
€8.98€35.99
€44.99
Responsive Web Design with HTML5 and CSS
Responsive Web Design with HTML5 and CSS
Read more
Sep 2022504 pages
Full star icon4.5 (56)
eBook
eBook
€8.98€35.99
€44.99
React and React Native
React and React Native
Read more
May 2022606 pages
Full star icon4.6 (17)
eBook
eBook
€8.98€29.99
€37.99
€32.99
Building Python Microservices with FastAPI
Building Python Microservices with FastAPI
Read more
Aug 2022420 pages
Full star icon4 (8)
eBook
eBook
€8.98€28.99
€35.99
Right arrow icon

About the author

Profile icon Abdulazeez
Abdulazeez
LinkedIn iconGithub icon
Abdulazeez Abdulazeez Adeshina is a skilled Python developer, backend software engineer, and technical writer, with a wide range of technical skill sets in his arsenal. His background has led him to build command-line applications, backend applications in FastAPI, and algorithm-based treasure-hunting tools. He also enjoys teaching Python and solving mathematical-oriented problems through his blog. Abdulazeez is currently in his penultimate year of a water resources and environmental engineering program. His work experience as a guest technical author includes the likes of Auth0, LogRocket, Okteto, and TestDriven.
Read more
See other products by Abdulazeez
Getfree access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order?Chevron down iconChevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book?Chevron down iconChevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium:Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge?Chevron down iconChevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order?Chevron down iconChevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries:www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges?Chevron down iconChevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live inMexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live inTurkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order?Chevron down iconChevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy?Chevron down iconChevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged?Chevron down iconChevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use?Chevron down iconChevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books?Chevron down iconChevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium:Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela

Create a Free Account To Continue Reading

Modal Close icon
OR
    First name is required.
    Last name is required.

The Password should contain at least :

  • 8 characters
  • 1 uppercase
  • 1 number
Notify me about special offers, personalized product recommendations, and learning tips By signing up for the free trial you will receive emails related to this service, you can unsubscribe at any time
By clicking ‘Create Account’, you are agreeing to ourPrivacy Policy andTerms & Conditions
Already have an account? SIGN IN

Sign in to activate your 7-day free access

Modal Close icon
OR
By redeeming the free trial you will receive emails related to this service, you can unsubscribe at any time.

[8]ページ先頭

©2009-2025 Movatter.jp