This Flask web application allows users to manage a collection of movies. Users can add, edit, rate, and delete movies within their collection.
-
Python 3.x
-
Install required Python packages using:
python -m pip install -r requirements.txt
On MacOS, use
pip3
instead ofpip
.
Flask Movies Collection utilizes data scraping through The Movie Database (TMDb) API to provide detailed information about movies. This integration allows users to seamlessly add new movies to their collection by searching and fetching data from TMDb.
- The Movie Database (TMDb): The project leverages the TMDb API to retrieve information such as movie titles, release years, descriptions, and poster images.
Ensure compliance with The Movie Database (TMDb) API terms of service while using this feature.
This project uses The Movie Database (TMDb) API to fetch movie information. To run the application, you'll need to obtain your own API key from TMDb by following these steps:
- Visit TMDb Developer and sign up for a developer account.
- Once logged in, navigate to your account settings to generate an API key.
- Copy the generated API key.
- Create a file named
.env
in the project root and add the following line: TMDB_API_KEY=your_generated_api_key
Make sure to replace your_generated_api_key
with the actual API key you obtained from TMDb.
- Save the
.env
file. This file is listed in the project's.gitignore
to ensure it's not included in the repository.
Now you're ready to run the application with your own TMDb API key.
-
Clone the repository:
git clone https://github.com/Herc-Ch/movie-website.git
-
Navigate to the project folder:
cd movie-website
-
Install dependencies:
python -m pip install -r requirements.txt
-
Run the application:
python main.py
The application will start, and you can access it at http://localhost:5000.
The live version of this application is accessible at https://my-movies-website.onrender.com/.
- View a list of movies with ratings and reviews.
- Edit the rating and review of each movie.
- Delete movies from the collection.
- Add new movies by searching The Movie Database (TMDb) API.
main.py
: The main application file.templates/
: HTML templates for rendering pages.static/
: Static files such as stylesheets and images.requirements.txt
: List of Python packages required for the project..env
: Environment variables configuration file (create this file).
Feel free to contribute to the project by opening issues or submitting pull requests. Follow the GitHub flow when contributing.
This project is licensed under the MIT License - see the LICENSE file for details.