An open API service indexing awesome lists of open source software.

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

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
```