TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Member-only story

Implementing FastAPI in 10 Minutes

Develop, test, and use your custom API

Kay Jan Wong
TDS Archive
Published in
5 min readApr 27, 2022

--

Photo by Levi Elizaga on Unsplash
Photo by Levi Elizaga on Unsplash

API (Application Programming Interface) is a connection between computer programs. In layman’s terms, we can think of API as a Python function where users can perform a task or get certain results when they “call an API”. A popular example would be likening API to a waiter, whereby you tell the waiter your order from a menu of choices, and the waiter will communicate that to the kitchen (a “system”) that prepares your order and the waiter will return your completed order to you.

APIs are valuable and can be monetized — and almost everything is an API now! If you want to know the weather forecast, the website interface calls a Weather API. If you want to know the shortest route from one location to another, the Google Maps website/mobile application calls the Google Directions Service API. You get the idea.

APIs can be implemented in Python using multiple frameworks, some of which include Django, Flask, or FastAPI. This article is a step-by-step guide on how to develop, test, and use your custom API using the FastAPI framework. You can skip the first two sections if you already have some knowledge of APIs.

Update: This article is part of a series. Check out other “in 10 Minutes” topics here!

Table of Contents

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Kay Jan Wong
Kay Jan Wong

Written by Kay Jan Wong

Data Scientist, Machine Learning Engineer, Software Developer, Programmer | Someone who loves coding, and believes coding should make our lives easier

No responses yet