Skip to content

A RESTful API implementation of Yummy Recipes in Python Flask Microframework

License

Notifications You must be signed in to change notification settings

indungu/yummy-rest

Repository files navigation

Yummy REST

Build Status Coverage Status Maintainability

This is a RESTful API implementation of the Yummy Recipes developer challenge. It is based on Flask with data persistence achieved using PostgreSQL.

Prerequisites

  1. Python version 3.6 or higher
  2. virtual environment creator of choice (This example uses pipenv)
  3. PostgreSQL 9.6

Install

Database Setup

$ cd path/to/your/workspace/
$ createdb -U <superuser_account> yummy_rest_db # replace the angle brackets with name of a user with db create permissions
$ psql -U <superuser_account> yummy_rest_db < "utilities/yummy_rest_db.sql" # this creates the database from .sql dump file
$ psql -U <superuser_account>
<super_user_account>=# \l # This will return a list of your databases. Check to confirm yummy_rest_db is listed
<super_user_account>=# \q # exit psql

Each of the above psql commands requests you to enter a password for the user provided. This project runs on a database created with the default superuser account postgres and a basic password password; this will need to be adjusted accodingly on the database URI string: APP.config['SQLALCHEMY_DATABASE_URI'] = 'postgres://<superuser_account>:<password>@localhost:5432/yummy_rest_db

Clone source

$ git clone -b develop https://github.com/indungu/yummy-rest # Clone the repository on the development branch
$ cd yummy-rest
$ pipenv install --three # Install/Create virtual environment
$ pipenv shell # Activate virtual env
$ pip install -r requirements.txt # Install package dependecies
$ python run.py # run the app - or in this case the API

To-Do

Enable users to:

  1. Register, login and manage their accounts /auth/*
  2. Create, update, view and delete a category /category/*
  3. Add, update, view or delete recipes

About

A RESTful API implementation of Yummy Recipes in Python Flask Microframework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages