This project provides a simple API for managing blogs and users. It allows you to create, delete, and update blogs in a local database directly from the project, as well as create users. All requests made can be checked at /docs.
- Clone this repository to your local machine.
- Navigate to the project directory in your terminal.
- Install the required dependencies using:
pip install -r requirements.txt - Run the FastAPI server with the following command:
This will start the server locally, and it will automatically reload whenever you make changes to the code.
uvicorn main:app --reload
- Create a new blog:
POST /blogv2 - Delete a blog:
DELETE /blog/{id} - Update a blog:
PUT /blog/{id} - Retrieve all blogs:
GET /blog - Retrieve a specific blog:
GET /blog/{id}
- Create a new user:
POST /user - Retrieve a specific user:
GET /user/{id} - Retrieve all users:
GET /user - Delete a user:
DELETE /user/{id}
You can access these APIs by creating a user or using an existing one in the database:
- Username: test
- Password: test123
The API documentation is available at /docs. You can explore and interact with the endpoints directly from the provided Swagger UI.
This project was created and is maintained by Bahna Darius. You can find me on LinkedIn.

