This tutorial is an introduction to the security features offered by the FastAPI framework for building APIs. The aim is to explore various methods of securing an API, including authentication, authorization, and encryption.
- Python 3.x
- Required libraries: FastAPI, starlette, Pydantic, etc.
Clone the repository and navigate to the directory.
git clone https://github.com/Adeyeha/FastApi-Security-Tutorial.git
cd <repo-directory>To run the examples, use the following command:
uvicorn <filename>:app --reload
Replace <file_name> with the name of the file you want to run.The tutorial covers the following security features:
- API authentication using API keys
- Token-based authentication using JWT
- Role-based authorization
- Encryption of sensitive data using SSL/TLS certificates
If you want to contribute to this project, please create a pull request with a detailed description of your changes.