Skip to content

vRezn0v/foss-catalog

Repository files navigation

Catalog App

A catalog app built with Flask for Udacity FSND program. Covering Authentication and Authorization and CRUD Operations courses.

Requirements:

Python Dependencies:

  • Flask
  • SQLAlchemy
  • Httplib2
  • Requests
  • OAuth2Client

Basic Setup:

  • Clone the repository:
    $ git clone https://github.com/vrezn0v/foss-catalog catalog
  • $ cd catalog
  • Install the python dependencies (not required in FSND VM):
    $ pip install -r requirements.txt
  • Initialize the database by running:
    $ python2 database_setup.py
  • Load Default Categories and Items by executing categorydbinit.py and dbpopulate.py:
    $ python2 categorydbinit.py
    $ python2 dbpopulate.py
  • Finally, run the Catalog App with,
    $ python2 catalog.py
  • Open your preferred browser and go to http://localhost:5000

Notes:

-The client_secrets.json file is preloaded, in case the client is revoked, obtain new Google Oauth API Keys from https://console.cloud.google.com/apis/credentials/oauthclient.
Download the client secrets and rename the file to client_secrets.json and place it in the repository root.

  • An arbitrary issue regarding login occurs at time, producing no output, a page reload resolves this.

JSON API Endpoints

http://localhost:5000/json/index : Shows all the categories.
http://localhost:5000/json/<int:category_id> : Shows items(apps) contained in a specific category.
http://localhost:5000/json/<int:category_id>/<int:item_id> : Shows details for the specified item.

Sources:

About

A catalog app built with Flask for Udacity FSND program.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published