This is a Fast API codebase that provides user management functionality.
-
Clone the repository:
git clone https://github.com/Hemanth95/user-management.git
-
Navigate to the project directory:
cd user-management -
Create a virtual environment:
python3 -m venv venv
-
Activate the virtual environment:
source venv/bin/activate -
Install the required dependencies:
pip install -r requirements.txt
-
Install Docker and Docker compose by following these instruction:
-
Running docker compose file
docker-compose up -d
-
Access the API endpoints using the following base URL:
http://localhost:8000/docs -
For Authorization while accessing endpoints, do pass the token in the header
Authorization : Bearer <token>
GET /users: Get a list of all users(only for admins).GET /users/profile: Get details of a specific user.POST /users/{user_id}/roles:Add roles to users.POST /auth/register: Create a new user.POST /auth/login: Login.POST /roles: Create new Roles.POST /roles/{role_id}/permissions: Create or Add permission to roles.