A multi-database movie rating and recommendation system.
- Clone the repository:
git clone <repository-url>
cd movie-rating-system- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .env.template .envThen edit .env with your database credentials and configuration.
The system supports multiple SQL databases:
- Set
COCKROACH_DATABASE_URLin.env - Format:
cockroachdb://user:password@host:port/dbname?sslmode=disable
- Set
POSTGRES_DATABASE_URLin.env - Format:
postgresql://user:password@host:port/dbname
- Set
MARIADB_DATABASE_URLin.env - Format:
mysql+pymysql://user:password@host:port/dbname - Requires PyMySQL package for MySQL protocol support
- Uses UTF-8 character set by default
You can configure the database connection pool in .env:
DB_POOL_SIZE: Maximum number of permanent connectionsDB_MAX_OVERFLOW: Maximum number of temporary connectionsDB_POOL_TIMEOUT: Seconds to wait before timing outDB_POOL_RECYCLE: Seconds before connections are recycled
export FLASK_APP=application.py
export FLASK_DEBUG=1
export FLASK_ENV=local
python3 -m flask run -h localhost -p 8048The application will be available at http://localhost:5000
- Multi-database support (CockroachDB, PostgreSQL, MariaDB) (WIP)
- Configurable connection pooling
- Environment-based configuration
- Colored logging
- Server-side pagination
- Advanced search filters
As of now, the database keys are expired, and no longer valid. However, if you create your own CockroachDB, Postgres, MariaDB database keys and simply replace them in the .env template, the project will be able to run on your local machine. Cheers!