Packages required:
- Python 3
- pip
- MySQL (MariaDB)
- MongoDB Community Server
$ pip install -r requirements.txt
Note: Do ensure that mysql & mariadb is running before running the program. mysql should be in $PATH
If you are unable to seed the database, you can run the following command to create the database and tables.
$ mysql --database=DBMS_Movie -u root -p password -h localhost -P 3306 < Seed.sql
The migration and seed file for the movie database is included at Database/DBMS_Movie/Seed.sql
Configuration files are stored in Config/config.ini
folder. You can change the configuration by editing the files.
cp Sample.Config.ini config.ini
[TMDB]
API_KEY =
ACCESS_TOKEN =
To get the API_KEY and ACCESS_TOKEN, you need to register an account on TMDB. After that, you can get the API_KEY and ACCESS_TOKEN from here.
[DBMS_MOVIE]
HOST = 127.0.0.1
PORT = 3306 # Change to your MySQL port
USERNAME = root # Change to your MySQL username
PASSWORD = root # Change to your MySQL password
DATABASE = DBMS_Movie
[DBMS_USER]
HOST = 127.0.0.1
PORT = 3306 # Change to your MySQL port
USERNAME = root # Change to your MySQL username
PASSWORD = root # Change to your MySQL password
DATABASE = DBMS_User
[FLASK]
HOST = 0.0.0.0
PORT = 5000
DEBUG = True
LOG_FILE = log/file/path # Change to your log file path
$ python app.py
OR
$ flask run
The Administrators can login to the system using the following credentials:
username: admin
password: admin
The movie database will be automatically seeded with the data from the seedfile, but if you encounter any error, you can run the following command to seed the database.
$ mysql --database=DBMS_Movie -u root -p password -h localhost -P 3306 < Seed.sql
The migration and seed file for the movie database is included at Database/DBMS_Movie/Seed.sql
.
The sql script can be executed in MySQL Workbench or any other MySQL client.
Internet connection will be required to access the TMDB API.
This is a known issue (TMDB rate limit). You can try to run the program again.
The program will be stable after caching the data.