A simple demonstration of IMDb API using Flask.
- Python 3
- Python PIP 3
- MySQL/SQLite3
For installing python package dependencies, run the following command:
pip3 install -r requirements.txt
No change needed.
Project contains pandas-flask.sql
sql file. Import this file. Change the database credentials located in app.py
file.
db = pymysql.connect(host="localhost",
user="root",
password="root",
db="movie_data",
charset='utf8mb4',
cursorclass=pymysql.cursors.DictCursor)
Uncomment line 6 in app.py
and comment line 8
from DBOperation.db import select_query, add_record, update_rating, update_genre
...
# from DBOperation.db_sqlite3 import select_query, add_record, update_rating, update_genre
Register for API key here: OMDb
Set API key on line 15 in app.py
api_key = "API_KEY"
python3 wsgi.py
Follow the following link: Link