Skip to Main Content
Workshop Intermediate First Talk

Create APIs Quickly in Python Using FastAPI

Proposal status is Review Pending
Session Description

Workshop Objectives:

  1. Introduce FastAPI as a modern, fast, and easy-to-use Python web framework for building APIs.
  2. Demonstrate how to create robust and scalable APIs quickly with minimal boilerplate code.
  3. Enable participants to build, test, and document APIs efficiently using FastAPI’s built-in features.

Target Audience:

  • Python developers interested in building APIs.
  • Software engineers looking to switch to a faster, more modern framework.
  • Students and professionals new to API development.

Key Takeaways:

  1. Understand the benefits of using FastAPI over traditional frameworks.
  2. Learn to create endpoints with built-in validation using Python type hints.
  3. Explore auto-generated, interactive API documentation using OpenAPI.
  4. Gain hands-on experience in developing, testing, and deploying APIs.

Workshop Agenda:

1. Introduction to FastAPI

  • What is FastAPI?
  • Why use FastAPI? (Performance, simplicity, auto-documentation)
  • Comparing FastAPI to other frameworks like Flask and Django.

2. Setting Up the Environment

  • Installing FastAPI and Uvicorn.
  • Overview of the required tools and libraries.
  • Setting up a starter project.

3. Building Your First API

  • Creating a simple API endpoint.
  • Adding request and response models using Pydantic.
  • Type hints for automatic validation.

4. Exploring Interactive Documentation

  • OpenAPI and Swagger UI integration.
  • Testing endpoints directly in the browser.

5. Adding More Features to Your API

  • Path and query parameters.
  • Handling JSON payloads and responses.
  • Error handling and custom exceptions.

6. Connecting to a Database

  • Integrating FastAPI with a database using SQLAlchemy
  • Basic CRUD operations for an example data model.

7. Securing APIs

  • Adding authentication and authorization.

8. Deployment and Next Steps

  • Deploying FastAPI applications with Uvicorn or Docker.
  • Tips for scaling and monitoring APIs.
  • Q&A and additional resources for learning.

Prerequisites:

  • Basic knowledge of Python programming.
  • A laptop with Python (3.7 or later) installed.


Session Categories

FOSS
Speakers are hidden and anonymized for this event.