Skip to content

pineapple-699/pineapple-flask-restapi

Repository files navigation

Pineapple Flask-REST-API

Build Status codecov

Development

This project is built with Flask.

Project Layout

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

Build

Install and create virtual environment library

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

Install project requirements usings the requirements.text

pip install -r requirements.txt

Run

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 data
  • python app.py: Run flask application

Endpoints

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

Resources

https://github.com/MaBlaGit/REST_API_Flask

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages