https://github.com/alisharify7/user-service-management
user-managment FastAPI service for microservice architecture
https://github.com/alisharify7/user-service-management
alembic async async-db-connection async-logging fastapi microservice rabbitmq redis user-service
Last synced: 2 months ago
JSON representation
user-managment FastAPI service for microservice architecture
- Host: GitHub
- URL: https://github.com/alisharify7/user-service-management
- Owner: alisharify7
- License: gpl-3.0
- Created: 2025-04-05T16:27:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-10T17:46:19.000Z (10 months ago)
- Last Synced: 2025-09-10T21:44:44.722Z (10 months ago)
- Topics: alembic, async, async-db-connection, async-logging, fastapi, microservice, rabbitmq, redis, user-service
- Language: Python
- Homepage: https://github.com/alisharify7/user-service-management
- Size: 369 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 👥 User Management Microservice (FastAPI + RabbitMQ)
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
## Tech Stack
## Features
- **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.

## API Endpoints
| 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 |
## RabbitMQ Queues
The service listens to these queues:
- `user.create` - Process user creation events
- `user.update` - Handle user update events
- `user.delete` - Manage user deletion events
## Prerequisites
- Python 3.12+
- RabbitMQ server
- FastAPI dependencies
- uv package manager
## Installation
1. Clone the repository:
```bash
git clone +
cd user-management
```