Skip to content

CodersVader/Item-Catalog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Item Catalog Application

by Arvind Rathee

Item Catalog Application project, part of the Udacity Full Stack Web Developer Nanodegree.

About

A web application that provides a list of items within a variety of categories and integrate third party user registration and authentication. Authenticated users should have the ability to post, edit, and delete their own items. This project uses Python 3.4 .

Python Libraries

This project uses following Libraries:

  • Random, String, Http2lib, Json (Comes along with python)
  • SQLAlchemy
    pip install sqlalchemy
  • Flask
    pip install flask
  • OAuth2
    pip install oauth2
  • Requests
    pip install requests

Project Content

  • app.py - This is the main file and contain main program.
  • database_setup.py - This file contain the structure of the database to be implemented.
  • db_items.py - This file contain the code to populate the database with dummy data.
  • client_secrets.json - This file contain info about the google api.
  • catalog.db - Database created after running database_setup.py and db_items.py
  • templates/ - This folder contain all the templates used to render the website.
  • static/ - This folder contain static files like CSS and JS files

Working

  • Download the project zip file to you computer and unzip the file or clone this repository to your desktop.
  • Navigate to the project directory.
  • Open terminal and run following command
    python app.py
  • Now the application is running locally.
  • Visit here to view the application.
  • If you want to run the application with your own credentials than follow these steps :

    Get an API key

    1. Login to your google account.
    2. Go to the Google API Console.
    3. Create or select a project.
    4. Click Continue to enable the API.
    5. On the Credentials page, get an API key (and set the API key restrictions). -> For More Info About the API Click Here.
    6. Download your client_secrets.json file.

    Running the Application

    • Replace client_secrests.json file with your file.
    • Replace data-clientid parameter value in login.html with your own client ID.
    • Now open Terminal and run following commands
      # Setting the database
      python database_setup.py
      # Populate the database with dummy data
      python db_items.py
      # Now run main file
      python app.py

JSON Endpoints

The following are open to the public:

  • Level JSON: /level/JSON - Displays all levels

  • Level Courses JSON: /level/<level_name>/JSON/ - Displays courses for a specific level

  • Course JSON: /level/<level_name>/<course_name>/JSON/ - Displays a specific course.

About

This is the project #4 for my Nanodegree.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors