Git Product home page Git Product logo

djongo-pizzaapi's Introduction

Pizza API

Django, MongoDB, Djongo, DRF

This is project is base curd app built with MongoDB database connection.

Online Deployed : link

Installation

  1. Create a python virtual environment and install requirements by using cmd pip install -r requirements.txt
  2. Add environment variable with config env file. And run python manage.py runserver.

Usage

  • For swagger ui use link
  • For redoc use link
  • Django has build-in admin panal link with username: admin and password: admin

API ENDPOINTS

Base url route: http://localhost:8000/api

  • /pizza-size : [GET, POST]
    • GET - show list of pizza size
    • POST - add new size { "name": "Medium" }
  • /pizza-topping : [GET, POST]
    • GET - show list of pizza topping
    • POST - add new topping { "name": "Onion" }
  • /pizza : [GET, POST]
    • GET - show list of pizza with all info with filter params ?type_pizza=regular&size_pizza=Small
      • type_pizza : regular or square
      • size_pizza : by name present on list /pizza-size
    • POST - add new pizza { "name": "Margherita", "type_pizza": "square", "size_pizza": "Small", "topping_pizza": "Cheese", "description": "Sticky" }
      • name : char
      • type_pizza : only two option square or regular
      • size_pizza : if it present on /pizza-size list then it only can be added
      • topping_pizza : if it present on /pizza-topping list then it only can be added
      • description : text
  • /pizza/:id : [GET, PUT, DELETE]
    • GET - show list of pizza with all info
    • PUT - add new pizza { "name": "Margherita", "type_pizza": "square", "size_pizza": "Small", "topping_pizza": "Cheese", "description": "Sticky" }
      • name : char
      • type_pizza : only two option square or regular
      • size_pizza : if it present on /pizza-size list then it only can be added
      • topping_pizza : if it present on /pizza-topping list then it only can be added
      • description : text
    • DELETE - delete the pizza with id

Postman

Use postman file , export 'PizzaAPI.postman_collection.json' on postman software.

djongo-pizzaapi's People

Contributors

coderj001 avatar

Watchers

 avatar  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.