In this project, you'll work with authentication, APIs and Basic CRUD operation with Flask framework.
- Login and Register
- Login with Google
- Add, Update, Delete Catalog (Authentication required)
- Add, Update, Delete Items in Particular Catalog(Authentication required)
- APIs for Add, Update, Delete Catalog with token based authentication
- Install Vagrant and VirtualBox
- Download or Clone fullstack-nanodegree-vm repository.
- Go to Catalog folder and put your project inside it.
- Install request auth library:
$ pip install requests requests_oauthlib
- Launch the Vagrant VM inside Vagrant sub-directory in the downloaded fullstack-nanodegree-vm repository using command:
$ vagrant up
- Then Log into this using command:
$ vagrant ssh
- From the vagrant directory inside the virtual machine,run application.py using:
python application.py
- Get All Catalogs : http://localhost:5000/api/catalog/
- Get particular Catalog : http://localhost:5000/api/catalog/<catalog_id>/
- Get particular Item : http://localhost:5000/api/item/<item_id>/
- Create Catalog : http://localhost:5000/api/catalog/new/ (Headers : authentication_token, Params : catalog_name)
- Update Catalog : http://localhost:5000/api/catalog/edit/ (Headers : authentication_token, Params : Params : catalog_id,catalog_name)
- Delete Catalog : http://localhost:5000/api/catalog/delete/ (Headers : authentication_token, Params : Params : catalog_id)
- Get All items for Catalog : http://localhost:5000/api/catalog/items/ (Headers : authentication_token, Params : Params : catalog_id,catalog_name)
pip install Flask-Migrate
export FLASK_APP="path to your application.py"
flask db init
flask db migrate
flask db upgrade