Welcome to the FastAPI Blog ๐ฅ - a modern, fast (high-performance) blogging platform built with FastAPI and SQLAlchemy. This application provides a robust backend system for blog management, offering features like user authentication, blog creation, updating, deletion, and real-time blog updates.
- User Authentication: Secure login system to access token-based authentication.
- Blog Management: Create, read, update, and delete (CRUD) functionalities for blog posts.
- Real-Time Updates: Leverage FastAPI's capability for real-time communication.
- Data Validation: Comprehensive validation for user inputs to maintain data integrity.
- Scalable Architecture: Designed to be easily scalable for future enhancements.
The application exposes several endpoints:
-
Token:
POST /token
: User authentication to receive an access token.
-
Users:
POST /users/
: Create a new user account.
-
Blogs:
GET /blogs/
: Retrieve all blogs.POST /blogs/
: Create a new blog post.GET /blogs/{id}
: Get a specific blog post.PUT /blogs/{id}
: Update a specific blog post.DELETE /blogs/{id}
: Delete a specific blog post.
-
Home:
GET /
: A simple endpoint to confirm the API is operational.
- Prerequisites: Ensure you have Python and pip installed.
- Installation: Clone the repository and install dependencies.
git clone https://github.com/concaption/fast-blog cd fast-blog make
- Run the Application: Start the FastAPI server.
make run
- Access Swagger UI: Navigate to
http://localhost:8000/docs
to access the Swagger UI for API interaction.
- FastAPI: High-performance web framework for building APIs.
- SQLAlchemy: SQL toolkit and ORM for database interactions.
- SQLite: Database engine for development.
- Uvicorn: ASGI server for running FastAPI.
The application uses OAuth2 password flow for secure access. Passwords are hashed and tokens are used for secure API access.
- Adding more interactive features with WebSockets.
- Implementing advanced user roles and permissions.
Contributions to the FastAPI Blog ๐ฅ are welcome! Please read the contribution guidelines before making a pull request.
For any queries or feedback, please reach out to [email protected].