Skip to content

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.

Notifications You must be signed in to change notification settings

shanu-shahbin/Blogs-FastAPI-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

Blogs-FastAPI-

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.

FastAPI - Swagger UI

Features

  • 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.

FastAPI - auth

Prerequisites

Before running the project, make sure you have the following installed:

Installation

  1. Clone the repository:

    git clone https://github.com/your_username/fastapi-blog-api.git
  2. Navigate to the project directory:

    cd fastapi-blog-api
  3. Install the dependencies:

    pip install -r requirements.txt

Usage

  1. Run the FastAPI server using uvicorn:

    uvicorn main:app --reload
  2. Open your web browser and navigate to http://localhost:8000/docs for the Swagger UI or http://localhost:8000/redoc for the ReDoc documentation.

  3. Authenticate using JWT tokens or OAuth2 to access protected routes.

Testing

You can test the API using Postman:

  1. Import the provided Postman collection (fastapi-blog-api.postman_collection.json) into Postman.
  2. Use the collection to send requests to the API endpoints and verify the responses.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.


About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published