Skip to content

JoseBi4Group/movie-bag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

movie-bag

This project is created to test Python + Flask + MongoDB following the next tutorial Flask Rest API - Zero to Yoda, but using structure of Blueprints insted of Flask-restful. MongoDB is managed by mongoengine.

Python extensions installed

This application has the following extensions:

  • Flask: pipenv install flask
  • MongoEngine: pipenv install flask-mongoengine
  • Encrypt passwords (bcrypt): pipenv install flask-bcrypt
  • JWT for authentication: pipenv instll flask-jwt-extended

Run application

pipenv shell
python app.py

Test application

Users module

  1. Add a new user.
    URL: http://localhost:5000/users
    Method: POST
    add_users_postman

  2. Sign in with the user created.
    URL: http://localhost:5000/users/login
    Method: POST
    sign_in_postman

  3. Get a list of users.
    URL: http://localhost:5000/users
    Method: GET
    get_users_postman

Movies module

  1. Add a new movie.
    URL: http://localhost:5000/movies
    Method: POST
    Authorization: Bearer Token (add user Token).
    add_movie_postman

  2. Get a list of movies.
    URL: http://localhost:5000/movies
    Method: GET
    Authorization: Bearer Token (add user Token).
    movies_postman

  3. Get a single movie.
    URL: http://localhost:5000/movies/<id>
    Method: GET
    Authorization: Bearer Token (add user Token).
    url_params: _id
    movie_postman

  4. Update a movie.
    URL: http://localhost:5000/movies/<id>
    Method: PUT
    Authorization: Bearer Token (add user Token).
    url_params: _id
    update_movie_postman

  5. Delete a movie.
    URL: http://localhost:5000/movies/<id>
    Method: DELETE
    Authorization: Bearer Token (add user Token).
    url_params: _id
    delete_movie_postman

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages