This project is built with Flask.
Key Folder | Parent Folder | Description |
---|---|---|
db | root | Holds the database and database creation tools |
models | root | Holds the main models and model methods for objects created in database |
endpoints | root | Holds the resources we use to create API endpoints |
cd python/
pip install virtualenv #if you don't have virtualenv installed
Create virtualenv
virtualenv <Name_of_Virtual_Environment>
Activate virtualenv
source <Name_of_Virtual_Environment>/bin/activate
Install project requirements usings the requirements.text
pip install -r requirements.txt
Here are some quick commands to get started after install. Make sure to run them in the root directory
rm db/pineapplestore.db && python db/database.py
: Creates database and populates it with fake datapython app.py
: Run flask application
Active endpoints
GET /users i.e. http://127.0.0.1:5000/users
GET /users/name i.e. http://127.0.0.1:5000/users/name
DELETE /users/name
POST /register
GET /products i.e. http://127.0.0.1:5000/products
GET /product/name i.e. http://127.0.0.1:5000/product/name
POST /product/name
GET /history/name i.e. http://127.0.0.1:5000/history/name
POST /shopping
POST /auth