Skip to content

FastAPI

Welcome to this series of 5 evenings where we will see how to build and deploy a backend that provides APIs with FastAPI and SQLModel, two new and interesting frameworks developed by Tiangolo.

FastAPI is a modern and lightweight web framework for rapid API development in Python. It has become extremely popular in the Python developer community due to its speed, ease of use, and ability to create highly performant web APIs with minimal effort.

Here are some key features of FastAPI:

  1. Speed: FastAPI is known for its exceptional performance. It leverages type hinting and automatic documentation generation to minimize overhead and maximize efficiency.

  2. Declarative Syntax: FastAPI uses a declarative syntax that allows developers to easily define API endpoints and their parameters using Python. This makes the code more readable and maintainable.

  3. Automatic Validation: FastAPI automatically performs data validation based on Python type hints, reducing the likelihood of errors and vulnerabilities in APIs.

  4. Automatic Documentation: FastAPI automatically generates interactive documentation for APIs using Swagger UI. This simplifies understanding and usage of APIs by developers.

  5. WebSockets Support: In addition to traditional HTTP APIs, FastAPI also offers support for WebSockets, enabling the development of real-time applications.

  6. Integrated Security: FastAPI includes built-in security features to handle authentication, authorization, and protection against common attacks.

  7. Extensibility: FastAPI is highly extensible, allowing developers to add custom middleware, authenticators, and additional features as needed.

  8. Active Community: FastAPI has a very active developer community, which means you can find a wide range of online resources, tutorials, and support libraries.

In summary, FastAPI is an excellent choice for Python developers looking to quickly and efficiently create well-documented, high-performance web APIs. Thanks to its ease of use and top-level performance, it has become one of the leading frameworks for API development in Python.

Structure of the series

  1. Introduction to FastAPI
  2. First APIs with a Test-Driven Development Approach
  3. SQL Model
  4. Backend with FastAPI and SQLModel
  5. Async, OAuth2, Profiling, and Dockerization

Material

Github

💻 Fast Cash project: Take a look at this interesting project developed within the community during the FastAPI course, and if you like, you can contribute to its improvement.

Github