Skip to content

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Movie Rating API

Python Django DRF OpenAPI JWT License: MIT

A RESTful API built with Django and Django REST Framework for managing movies, ratings, reviews, watchlists, genres, and tags.

It provides authentication, filtering, searching, ordering, nested resources, and interactive API documentation out of the box.

Swagger-UI Screenshot

Acccess at http://127.0.0.1:8000/api/schema/swagger-ui

swagger-screenshot

Features

  • JWT Authentication
  • Movie management
  • Rate movies (0–10)
  • Reviews linked to ratings
  • Personal watchlist (Planned / Watched)
  • Genres and tags
  • Filtering, searching, and ordering
  • Pagination
  • Serializer and model validation
  • Interactive Swagger & ReDoc documentation

Tech Stack

  • Python
  • Django
  • Django REST Framework
  • JWT Authentication
  • drf-spectacular (OpenAPI)

Getting Started

Clone the repository

git clone https://github.com/zoanig/django-movie-api.git
cd django-movie-api

Create a virtual environment

python -m venv .venv

Activate it.

Windows

.venv\Scripts\activate

Linux/macOS

source .venv/bin/activate

Install dependencies

pip install -r requirements.txt

Apply migrations

python manage.py migrate

(Optional) Import movie dataset

python manage.py import_movies ./tmdb-movies.csv 

Run the server

python manage.py runserver

The API will be available at:

http://127.0.0.1:8000/

API Documentation

Once the server is running:

Documentation URL
Swagger UI /api/schema/swagger-ui/
ReDoc /api/schema/redoc/
OpenAPI Schema /api/schema/

Core Resources

  • Movies
  • Ratings
  • Reviews
  • Movie Lists
  • Genres
  • Tags
  • User Profiles
  • Authentication

Authentication

The API uses JWT (JSON Web Tokens).

Authenticate using the provided token endpoints, then include the access token in requests:

Authorization: Bearer <access_token>

Project Structure

.
├── app/
│   ├── models.py
│   ├── serializers.py
│   ├── views.py
│   ├── permissions.py
│   ├── filters.py
│   ├── urls.py
│   └── management/
├── movie_rating/
│   ├── settings.py
│   ├── urls.py
│   └── ...
└── manage.py

Validation

The API includes validation for:

  • Rating values
  • Duplicate ratings
  • Duplicate watchlist entries
  • Required relationships
  • Serializer-level request validation

Invalid requests return descriptive error messages with appropriate HTTP status codes.

License

This project is available under the MIT License unless stated otherwise.

About

RESTful Movie Rating API built with Django REST Framework featuring JWT authentication, reviews, watchlists, filtering, nested resources, and OpenAPI documentation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages