A FastAPI-based microservice for user management with RabbitMQ event integration, providing RESTful APIs and message queue support for distributed systems.
fully async support async DB orm (sqlalchemy), async logging (stdout, file + rotation), async redis, async rabbitmq
- User CRUD Operations: Create, Read, Update, and Delete users via API
- RabbitMQ Integration: Event-driven architecture for microservice communication
- RESTful API: Fully documented endpoints following OpenAPI standards
- Scalable Design: Ready for containerized deployment in cloud environments
- Comprehensive User Management: Add, edit, and delete users.
- Powerful API: Exposes RESTful APIs for user management.
- RabbitMQ Support: Listens to RabbitMQ queues for asynchronous operations.
- Microservice-Ready: Designed for use in microservice architectures.
- Automatic Documentation: Uses Swagger UI for automatic API documentation.
- Data Validation: Employs Pydantic for input/output data validation.
- Persistence: Utilizes a database for user data storage.
Endpoint | Method | Description |
---|---|---|
/users |
POST | Create new user |
/users |
GET | List all users |
/users/id/{user_id} |
GET | Get user details by its id |
/users/username/{username} |
GET | Get user details by its username |
/users/public_key/{public_key} |
GET | Get user details by its public key |
/users/{user_id} |
PUT | Update user |
/users/{user_id} |
DELETE | Delete user |
The service listens to these queues:
user.create
- Process user creation eventsuser.update
- Handle user update eventsuser.delete
- Manage user deletion events
- Python 3.8+
- RabbitMQ server
- FastAPI dependencies
- Clone the repository:
git clone + cd user-management