This is a Flask-based RESTful API for managing movies and user authentication.
- Movie Management: Allows CRUD operations on movies (Create, Read, Update, Delete).
- User Authentication: Supports user authentication with role-based access control.
- Python 3.x
- Flask
- Flask-RESTful
- Flask-SQLAlchemy
- Flask-Bcrypt
-
Clone the repository:
git clone https://github.com/yourusername/flask-movie-api.git
GET /movies: Retrieves all movies.POST /movies: Adds a new movie (Requires authentication).GET /movies/<movie_id>: Retrieves a specific movie.PUT /movies/<movie_id>: Updates a specific movie (Requires authentication).DELETE /movies/<movie_id>: Deletes a specific movie (Requires authentication).
GET /user: Retrieves all users (Accessible only for admins).POST /user: Adds a new user (Accessible only for admins).GET /user/<user_id>: Retrieves a specific user (Requires authentication).PUT /user/<user_id>: Updates a specific user (Accessible only for admins).DELETE /user/<user_id>: Deletes a specific user (Accessible only for admins).
POST /auth: Authenticates a user.
-
Install dependencies:
pip install -r requirements.txt