Yummy recipes provides a platform for users to keep track of their awesome recipes and share with others if they so wish.
Yummy recipes provides a platform for users to keep track of their awesome recipes and share with others if they so wish.
- Users create accounts
- Users can log in
- Users create, view, update and delete recipe categories
- Users can create, view, update or delete recipes in existing categories
The following software is needed for the project:
- Python 3.XX
- Flask
- Postman(optional)
Follow this steps to get you up and running:
- Install python
Download python for windows on Official python website and run the executable file
You need to go to the website and download the Python installer and run the file.
On the command line run $ sudo apt-get install python3.6
-
Clone the project
git clone https://github.com/kevinsamoei/Yummy_Recipe_Api
-
Move into the project's folder
cd Yummy_Recipe_Api
-
Install virtual environment and Create a virtual environment
pip install virtualenv
-
create a virtual environment called "myenv"
$ python3 -m venv myvenv
-
Activate your virtual environment
source myvenv/bin/activate
-
Install project requirements
(myvenv) ~$ pip install -r requirements.txt
-
Create your postgresql database and change the uri in the
config.py
module -
Run the application
(myvenv) ~$ python run.py
To run the tests use either pytests or nosetests:
pytest --cov=api tests/
nosetests --with-coverage --cover-tests --cover-erase --cover-package=api
URL Endpoint | HTTP requests | access | Public access |
---|---|---|---|
POST /api/auth/register/ | POST | Register a new user | TRUE |
POST /api/auth/login/ | POST | Login and retrieve token | TRUE |
POST /api/auth/logout/ | POST | Logout a user and revoke access | TRUE |
POST /api/auth/reset-password/ | POST | Reset a user's password | TRUE |
URL Endpoint | HTTP requests | access | Public access |
---|---|---|---|
POST /api/categories/ | POST | Create a new category | FALSE |
GET /api/categories/ | GET | Retrieve a paginated list of categories | FALSE |
GET /api/categories/<id> | GET | Retrieve a category with the specified id | FALSE |
PUT /api/categories/<id> | PUT | Edit a category | FALSE |
DELETE /api/categories/<id> | DELETE | Delete a category | FALSE |
URL Endpoint | HTTP requests | access | Public access |
---|---|---|---|
POST /api/recipes/ | POST | Create a new recipe | FALSE |
GET /api/recipes/ | GET | Retrieve a paginated list of recipes | FALSE |
GET /api/recipes/<id> | GET | Retrieve a recipe with the specified id | FALSE |
PUT /api/recipes/<id> | PUT | Edit a recipe | FALSE |
DELETE /api/recipes/<id> | DELETE | Delete a recipe | FALSE |
- Python 3.6
- Flask 0.12.2
- Flask-RestFul
- Postgresql
- Kevin samoei
♥️
This project is licensed under the MIT License - see the LICENSE.md file for details
- Andelans
- Stack overflow
- Official documentations for python, flask, postgresql