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
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}
๐
- Clone the repo
git clone https://github.com/Anu-Ra-g/beyondcc.git
- Change the app directory
cd beyondcc
- Activate the virtual environment
venv\Scripts\activate (Windows)
- 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