This project is an API built using Pyhon, FastAPI, MySQL as the database, JWT for authentication control.
This project was build for API Development with Python and FastAPI Course and may be available on my Youtube Channel, to demonstrate how to configure Authentication and Implement Security using JWT token.
- Clone the repository:
[email protected]:asmaur/fastapi-blog-course.git
Make sure you have Docker and Docker compose installed and working on your computer
-
Start the application with Docker compose
docker compose up
if the app fail to connect to the database at first run. Kill all container and try again.
-
The API will be accessible at http://localhost:8080/
The API provides the following endpoints:
GET /blog - Retrieve a list of all post. (all authenticated users)
GET /blog/{id} - Retrieve a list of all products. (all authenticated users)
POST /blog - Create a new post (all authenticated users).
PUT /blog/{id} - Update a post. (all authenticated users)
DELETE /blog/{id} - Delete a post. (all authenticated users)
POST /login - Login into the App
POST /users - Register a new user into the App
The API uses JWT for authentication control.
The project utilizes MySQL as the database. The necessary database migrations are managed using SQLAlchemy
.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request to the repository.
When contributing to this project, please follow the existing code style, commit conventions, and submit your changes in a separate branch.