Introduction to FastAPI

Start Free Preview

Buying via our links supports this free directory · Affiliate disclosure.
Course facts
  • Payment: Free Preview (Paid Upgrade)
  • Learning style: Self-paced, start anytime
  • Format: Text & Interactive
  • Video access: Streaming Only
  • Before you start: Introduction to APIs in Python; Introduction to Object-Oriented Programming in Python
DataCamp details
  • Chapters: 3
Created byDataCamp
Available onDataCamp

Course Details
Learning Style

Start Anytime

Level

Intermediate

Study Mode

100% Online

Duration

Short (< 10 Hours)

Languages
Audio Language

English

Outcomes
Certificate

Certificate of Completion

Price & Terms
Pricing Model

Free Preview (Paid Upgrade)

Technical
Content Medium

Text & Interactive

Video Access

Streaming Only

Specification
Access

Subscription

Build Python APIs with FastAPI: handle all four HTTP operations, validate requests, return status codes, use async and test a JSON CRUD API.

At a glance
Duration4 hrs
LevelIntermediate
CertificateCertificate of Completion
LanguageEnglish
Taught byMatt Eckerle
AccessSubscription
Add your review
Add to wishlistAdded to wishlistRemoved from wishlist 0
Add to compare

FastAPI is a Python web framework for building APIs that manage data on the web, and data and machine learning engineers use it for applications that handle data transactions and pipelines. You write endpoints for the four HTTP operations, validate incoming requests against schemas, answer failures with suitable status codes and messages, and run code asynchronously so an application can cope with heavier workloads. A small create, read, update and delete API, tested end to end, ties these pieces together.

What You Will Achieve

  • Write FastAPI endpoints that read and change data through all four HTTP operations
  • Define request and response schemas so incoming data is validated before your code acts on it
  • Send back a fitting status code and message when a client request fails
  • Test an API’s endpoints one at a time and as a working whole with Python’s requests module


Program Overview

FastAPI Basics: GET and POST Operations

Starts with what FastAPI is good at, runs a first application, and builds GET and POST endpoints that accept request parameters.

  • Key features and core use cases of FastAPI
  • FastAPI compared with Django
  • A first application and GET endpoints
  • POST operations with a Pydantic model

Advanced FastAPI Topics

Adds the remaining HTTP operations, careful error responses and asynchronous code for handling more requests at once.

  • PUT and DELETE operations
  • Error handling and status code classification
  • Responding to a client error
  • Async for concurrent work and when to use it

Building and Testing a JSON CRUD API

Puts the pieces into one JSON API that manages object lifecycles over HTTP, checked with automated and manual tests.

  • Unit tests versus system tests
  • HTTP operations mapped to CRUD steps
  • A complete JSON CRUD API
  • Manual functional tests

Certificate Awarded (Paid)


Job Outlook

FastAPI skills are used wherever Python applications need to expose data over HTTP, including data management services and the pipelines that serve machine learning models.


Our take

Good for: Python programmers who want to build and test their own APIs for data services or for serving machine learning models.

Keep in mind: Exercises run in the course environment with nothing to install; to build your own FastAPI projects afterwards you will want a local Python setup.

Bottom line: A compact walk through FastAPI’s request handling, error responses and async code that ends with a tested CRUD API you build yourself.

Frequently Asked Questions

Which other web framework is FastAPI compared with?

The first chapter sets FastAPI beside Django as part of a look at its key features and the core use cases where it fits among Python web frameworks.

What role does Pydantic play in the lessons?

A Pydantic model defines the schema for the data a POST request carries. The first chapter introduces the model and then puts it to work in a running POST endpoint.

What does the async lesson cover?

The second chapter shows how to use async so an application can serve concurrent requests and handle higher workloads, discusses when async is the right choice, and applies it to a DELETE operation.

What does the final JSON CRUD project involve?

You build a JSON API that manages objects over HTTP, mapping each HTTP operation to a create, read, update or delete step. System tests check single endpoints, and a manual functional test checks them working together.

User Reviews

0.0 out of 5
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0

No reviews yet. Be the first to review this course.

There are no reviews yet.

Write your review

Reviews can only be posted by registered learners. Log in or create a free account, then you will return here to post.

×

    Report this page
    LiveTalent
    Logo
    Compare items
    • Total (0)
    Compare
    0