This is a RESTful API implementation of the Yummy Recipes developer challenge. It is based on Flask with data persistence achieved using PostgreSQL.
- Python version 3.6 or higher
- virtual environment creator of choice (This example uses
pipenv
) - PostgreSQL 9.6
$ 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
$ 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
Enable users to:
- Register, login and manage their accounts
/auth/*
- Create, update, view and delete a category
/category/*
- Add, update, view or delete recipes