© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
M. LathkarHigh-Performance Web Apps with FastAPIhttps://doi.org/10.1007/978-1-4842-9178-8_9

9. Security and Testing

Malhar Lathkar1  
Nanded, Maharashtra, India

Since an API exposes the endpoints of the server’s resources to be consumed by other third-party apps, ensuring that access is only granted to authorized users becomes the topmost priority for developers. Similarly, it is also important that the code is subjected to proper testing before releasing it to the users.

In this chapter, we are going to address these important topics:
  • Exception handling

  • Security

  • Testing

  • AsyncClient

Exception Handling

The fact that, in any software, a proper exception handling ...

Get High-Performance Web Apps with FastAPI: The Asynchronous Web Framework Based on Modern Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.