Cover Image for FastAPI Fundamentals : Learn to build high-performance APIs with FastAPI!
Cover Image for FastAPI Fundamentals : Learn to build high-performance APIs with FastAPI!
Avatar for Moringa
Presented by
Moringa
Shape Your Future with Africa's Top Tech Bootcamp
163 Went

FastAPI Fundamentals : Learn to build high-performance APIs with FastAPI!

Zoom
Registration
Registration Closed
This event is not currently taking registrations. You may contact the host or subscribe to receive updates.
About Event

​Overview:

​FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints. It's designed to be easy to use and highly performant. This workshop aims to provide participants with a comprehensive understanding of FastAPI fundamentals, including its architecture, routing, request handling, data validation, and more.

​Target Audience: Developers familiar with Python programming language who want to learn how to build robust APIs efficiently using FastAPI.

​Prerequisites:

  • ​Basic understanding of Python programming language

  • ​Familiarity with HTTP protocol and RESTful APIs concepts is beneficial but not required

​Workshop Outline:

  1. ​Introduction to FastAPI

    • ​Overview of FastAPI

    • ​Features and advantages

    • ​Comparison with other frameworks (e.g., Flask, Django)

  2. ​Setting Up Development Environment

    • ​Installing FastAPI and required dependencies

    • ​Setting up a virtual environment

    • ​Hello World with FastAPI

  3. ​Routing and Request Handling

    • ​Defining routes and handling HTTP methods

    • ​Path parameters and query parameters

    • ​Handling request data (JSON, form data, files)

  4. ​Data Validation and Serialization

    • ​Using Pydantic for data validation and serialization

    • ​Defining request and response models

    • ​Automatic data conversion and validation

  5. ​Dependency Injection and Middleware

    • ​Understanding dependency injection in FastAPI

    • ​Implementing middleware for request/response manipulation

    • ​Authentication and authorization middleware

  6. ​Asynchronous Programming

    • ​Introduction to asynchronous programming in Python

    • ​Leveraging async/await with FastAPI

    • ​Handling asynchronous requests efficiently

  7. ​Testing FastAPI Applications

    • ​Writing unit tests for FastAPI endpoints

    • ​Using FastAPI TestClient for API testing

    • ​Integration testing with pytest

  8. ​Documentation and OpenAPI

    • ​Generating API documentation with Swagger UI and ReDoc

    • ​Customizing documentation with FastAPI

    • ​OpenAPI specifications and automatic documentation generation

  9. ​Deployment and Production Considerations

    • ​Deploying FastAPI applications to various platforms (e.g., Heroku, AWS, Docker)

    • ​Optimizing for production (e.g., performance tuning, monitoring)

    • ​Security best practices

  10. ​Advanced Topics (Optional)

    • ​WebSocket support

    • ​Background tasks and scheduling

    • ​Custom middleware and extensions

​Hands-on Exercises:

  • ​Create a simple CRUD API for managing a user database

  • ​Implement authentication and authorization middleware

  • ​Write unit tests and integration tests for the developed API

  • ​Document the API endpoints using Swagger UI and ReDoc

​Resources and References:

  • ​Official FastAPI documentation

  • ​FastAPI GitHub repository

  • ​Pydantic documentation

  • ​Asynchronous Python documentation

  • ​Real Python tutorials on FastAPI

Avatar for Moringa
Presented by
Moringa
Shape Your Future with Africa's Top Tech Bootcamp
163 Went