Giter Club home page Giter Club logo

movies-api's Introduction

Description

This is a REST API resembling a movie database same as IMDb. The data about the movies is stored in a SQLite database that is already present in this repository under /api/database/db.sqlite3. This database is already populated with the data that was provided. But the code can generate a new SQLite database, on running the code if the database doesn't already exist. The repository also includes the SQL statements necessary to populate the database, which is present here /sql/movie_data.sql. The database schema includes users, movies, and genres tables. The venv contains the necessary packages needed to run the folder. The API is documented with Swagger. The API uses JWT authentication for user authentication.

Packages used for this project

  • Flask
  • Flask-RESTx
  • Flask-SQLAlchemy
  • Flask-JWT-Extended
  • PyJWT
  • python-dotenv

API endpoints

  • POST /auth/signup
  • POST /auth/login
  • POST /auth/refresh ๐Ÿ”’ (refresh token)
  • GET /movies/allmovies
  • POST /movies/movie ๐Ÿ”’
  • PUT /movies/movie/{movie_id} ๐Ÿ”’
  • GET /movies/movie/{movie_id} ๐Ÿ”’
  • DELETE /movies/movie/{movie_id} ๐Ÿ”’

To run the code

  1. Clone the repo
    git clone https://github.com/Anu-Ra-g/beyondcc.git
  2. Change the app directory
    cd beyondcc
  3. Activate the virtual environment
    venv\Scripts\activate (Windows)
  4. Run the command
    python runserver.py

Activating the virtual environment, will make the app run with all the necessary packages. On, running the command, the development server will be activated, running at localhost:5000. The URL will present an UI, made with the help of Swagger UI. Here you can make the HTTP requests to the endpoints. It will look like this

alt text for image

movies-api's People

Contributors

anu-ra-g 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.