Note *** Switch to master branch for code
The FastAPI Blog API is a RESTful web service built using FastAPI, allowing CRUD (Create, Read, Update, Delete) operations on blog posts. It provides endpoints for managing blog posts with authentication using JWT tokens and OAuth2. The API also integrates Swagger UI and ReDoc for interactive API documentation.
- CRUD Operations: Perform Create, Read, Update, and Delete operations on blog posts.
- Interactive API Documentation: Integrated Swagger UI and ReDoc for easy exploration of API endpoints.
- Authentication: Secure endpoints using JWT tokens and OAuth2 for user authentication.
- Validation: Input data validation ensures data integrity and security.
- Pagination: Paginate through large collections of blog posts to improve performance.
- Search: Search functionality to find specific blog posts based on keywords.
- User Management: Manage users with roles and permissions for accessing resources.
- Testing: Thoroughly tested using Postman API for reliability and stability.
- Logging: Comprehensive logging to track API requests, errors, and system behavior.
- Deployment: Easily deploy the API to various platforms such as AWS, Azure, or Google Cloud.
Before running the project, make sure you have the following installed:
-
Clone the repository:
git clone https://github.com/your_username/fastapi-blog-api.git
-
Navigate to the project directory:
cd fastapi-blog-api
-
Install the dependencies:
pip install -r requirements.txt
-
Run the FastAPI server using uvicorn:
uvicorn main:app --reload
-
Open your web browser and navigate to http://localhost:8000/docs for the Swagger UI or http://localhost:8000/redoc for the ReDoc documentation.
-
Authenticate using JWT tokens or OAuth2 to access protected routes.
You can test the API using Postman:
- Import the provided Postman collection (
fastapi-blog-api.postman_collection.json
) into Postman. - Use the collection to send requests to the API endpoints and verify the responses.
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.