Code Monkey home page Code Monkey logo

recipe-sharing-api-python-in-fastapi's Introduction

markdown

Recipe API

This project implements a simple recipe management system using Flask for the API and MSSQL for the database. It allows users to add, retrieve, update, and delete recipes, rate recipes, and add comments.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Installation

To run the application, make sure you have Docker installed on your machine.

  1. Clone this repository:

css

  1. Navigate to the project directory:

arduino

#cd recipe-api

  1. Build and run the application using Docker:

sql

docker-compose up --build

  1. Access the API at http://localhost:5000

API Endpoints

  • POST /recipes/: Add a new recipe.
  • GET /recipes/: Retrieve a list of all recipes, sorted by most recent.
  • GET /recipes/<recipe_id>: Retrieve details of a specific recipe by its ID.
  • PUT /recipes/<recipe_id>: Update a specific recipe by its ID.
  • DELETE /recipes/<recipe_id>: Delete a specific recipe by its ID.
  • POST /recipes/<recipe_id>/ratings/: Rate a specific recipe.
  • POST /recipes/<recipe_id>/comments/: Comment on a specific recipe.
  • GET /

recipes/<recipe_id>/comments/: Retrieve all comments for a specific recipe.

docker-compose up --build

Usage

markdown

Once the containers are up and running, you can access the API using the following endpoints:

  • POST /recipes: Add a new recipe.
  • GET /recipes: Retrieve a list of all recipes.
  • GET /recipes/<recipe_id>: Retrieve details of a specific recipe.
  • PUT /recipes/<recipe_id>: Update a specific recipe.
  • DELETE /recipes/<recipe_id>: Delete a specific recipe.
  • POST /recipes/<recipe_id>/ratings: Rate a specific recipe.
  • POST /recipes/<recipe_id>/comments: Comment on a specific recipe.
  • GET /recipes/<recipe_id>/comments: Retrieve all comments for a specific recipe.

Evaluation Criteria

  • Code quality, readability, and organization.
  • Proper implementation of the API and database interactions.
  • Proper use of Docker for containerization.
  • Handling edge cases and error scenarios.

Bonus Tasks

  • Implementation of user authentication, search functionality, recipe suggestions, and unit tests.

Authors

  • Juliana Jasmin Aliswag | 3.19.2024

recipe-sharing-api-python-in-fastapi's People

Contributors

vanelli0n avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.