Web application that allows users to add, edit and delete items and categories in an item catalog.
Item Catalog is a web application written in Python 3 using the Flask framework. It serves up a website that allows you to create, view, update and delete categories and items in the catalog. All logged in users can add items for public display. Users can edit their own entries. Login functionality is added using the Google OAuth2 API.
- Python 3.7
- flask
- flask_login
- oauth2client
- httplib2
- SQLAlchemy
- requests
- dotenv
- passlib
The web application was made to implement a user controlled relational database open for public viewing. Users are authorized to:
- Add new categories.
- Edit and delete categories they have created.
- Add new items sorting under their own categories.
- Edit and delete items they have created.
Authentication is done through either signing in using your google account, or by registrering as a user and logging in to the application. The database does not save the password itself. The passwords are used to generate a 256-bit hash, which in turn is stored in the database.
Using pip3 install virtualenv
pip3 install virtualenv
Create a virtual environment
python3 -m venv nameOfVirtualEnvironment
Source the environment to activate it
source nameOfVirtualEnvironment/bin/activate
Go to the root directory of the repository and create a file named .env and fill in the required information:
import os
DATABASE_PASSWORD =
GOOGLE_CLIENT_ID =
GOOGLE_CLIENT_SECRET =
GOOGLE_REDIRECT_URI = http://mydomain:myport/login/authorized
LISTEN_INTERFACE = 0.0.0.0
LISTEN_PORT = 8080
Install required libraries:
pip3 install -r requirements.txt
Set privileges to execute the run.py file:
chmod +x run.py
Launch the application:
./run.py
Open your favourite browser (except for internet explorer) and go to
http://localhost:8080