Skip to content

A secure and scalable REST API built with Django 5 and Django REST Framework, designed for modern user management. This project includes registration, authentication, profile management, and advanced search & filtering with django-filter.

Notifications You must be signed in to change notification settings

banumariwan/user_api_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧩 User API Project (Django REST Framework)

A clean, modular, and secure Django REST API for user management, authentication, filtering, and search. This project was built using Django 5, Django REST Framework, and django-filter.

πŸš€ Features βœ… User Management

Register new users

Login with token authentication

Update profile

Delete account

πŸ” Custom Permissions

Restrict access based on authenticated user

Prevent users from editing others’ data

πŸ”Ž Filtering & Search (Day 25)

Search users by username, email

Filter by is_active, date_joined, etc.

Built with django-filter

πŸ“¦ API Endpoints Method Endpoint Description POST /api/register/ Create a new user POST /api/login/ Obtain auth token GET /api/users/ List all users (with search & filter) GET /api/users// Retrieve a user PUT /api/users// Update DELETE /api/users// Delete πŸ› οΈ Technologies Used

Python 3.13

Django 5.2

Django REST Framework

Django Filter

SQLite3 (default DB)

πŸ“ Project Structure user_api_project/ │── accounts/ β”‚ β”œβ”€β”€ models.py β”‚ β”œβ”€β”€ serializers.py β”‚ β”œβ”€β”€ views.py β”‚ β”œβ”€β”€ urls.py β”‚ β”œβ”€β”€ permissions.py β”‚ β”œβ”€β”€ filters.py │── user_api_project/ β”‚ β”œβ”€β”€ settings.py β”‚ β”œβ”€β”€ urls.py │── manage.py

βš™οΈ Installation & Setup 1️⃣ Clone the repository git clone https://github.com/banumariwan/user_api_project.git cd user_api_project

2️⃣ Create virtual environment python -m venv .venv

3️⃣ Install dependencies pip install -r requirements.txt

4️⃣ Run migrations python manage.py migrate

5️⃣ Start the server python manage.py runserver

πŸ§ͺ Testing the API

You can test endpoints using:

Postman

cURL

Thunder Client

DRF’s browsable API (default)

πŸ” Search & Filter Examples Search by username: /api/users/?search=banu

Filter by active users: /api/users/?is_active=True

Combine: /api/users/?search=mar&is_active=True

πŸ“œ License

This project is licensed under the MIT License.

About

A secure and scalable REST API built with Django 5 and Django REST Framework, designed for modern user management. This project includes registration, authentication, profile management, and advanced search & filtering with django-filter.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages