Giter VIP home page Giter VIP logo

django_rest_api's Introduction

Django Rest_Api Project with OMDB's API to Display Movies.

Requirements

This Project is developed using Django and Django REST Framework . Additional requirements are included in requirement.txt file for interaction with www.omdbapi.com api.
Also change the OMDB_API_KEY in the settings.py

How to run project locally

Clone repository and got to project's root directory afterwards follow steps:

  1. Activate python virtual environment
    source /path/to/local/env

  2. Install requirements
    pip install -r requirements.txt

  3. Make Migrations
    Currently sqllite3 database is used, you can change it according to your convenience.

    python manage.py makemigrations
    python manage.py migrate

  4. Run server
    python manage.py runserver

GET /movies/

Shows you the list of all the movies in the local database.

POST /movies/

Fetches movie data from external api and save it in to the local database.

Required Headers:
Content-Type: application/json

Required json body fields:
title

{
    "title": "movie name"
}

DELETE or UPDATE /movies//

Deletes movie from local database or updates content of that movie in local database.

Published Year fetch

movies/published_year/year/ eg: movies/published_year/2007/

This will return all the movies published in the year 2007.

Movies fetched based on ratings

movies/ratings/rating/ eg: movies/ratings/8/

This will return all the movies having ratings equal to or greater than 8.

Genre based fetching

movies/genres/genre/ eg: movies/genres/comedy/

This will return all the movies whose genre has comedy in it.

For better Visualization and Understanding of the project please refer to the Screenshots folder

django_rest_api's People

Contributors

vivaan998 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.