A catalog app built with Flask for Udacity FSND program. Covering Authentication and Authorization and CRUD Operations courses.
- Python 2.7
- Vagrant (Running the Udacity FullStack Nanodegree VM)
- git
- Flask
- SQLAlchemy
- Httplib2
- Requests
- OAuth2Client
- 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
anddbpopulate.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
-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.
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.
- Google's Oauth Documentation
- Head First Python (Book)
- View Decorators