Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Djongo-api-endpoints

djongo (django+mongoDB) basic API endpoints

Documentation Himanshu Yadav

Starting the project API endpoint documentation

Starting the Project

  1. Download the .zip or clone the repository

  2. Use pipenv shell command to make virtual environment. image

  3. Use pip install –r Requirements.txt in the directory to install the required libraries.

  4. Use manage.py runserver command in the same directory as manage.py file. image

API Endpoints’ documentation

image

  1. View information of Pizzas: image image

Description: It takes all the information of Pizzas in the database and returns it as response_dict dictionary. Input : takes no input Output : List of all the Pizzas image

  1. Create Pizza image

It takes value for input for a pizza and creates object for it in database, if type is not one of the two specified, it will not make the entry in DB. Input data: image

Output and Result: image

If TYPE mentioned wrong, result is failure image image

  1. Edit or Delete Pizza image

It takes the value of primary key to identify the record to be edited or deleted, and then it updates or deletes the record as per new info provided. Process input determines the process to be performed. image

Input (edit) : image

OUTPUT: Before: image

After: image

  1. Use manage.py runserver command in the same directory as manage.py file. image

Input (delete): image

Output: Before: image

After: image

  1. Filter:
    image

This takes no input and traverses through all entries and creates classification and filtering and returns a dictionary with three entities: Filtered by Type Filtered by Size Filtered by Toppings

Output: { "bytype": { "square": { "pizSize": [ "medium" ], "pTops": [ "nuts,sauce," ] } }, "bysize": { "too small": { "pizType": [ "square" ], "pTops": [ "nuts,sauce," ] }, "medium": { "pizType": [ "square" ], "pTops": [ "nuts,sauce," ] } }, "bytops": { "nuts,sauce,": { "pizSize": [ "medium" ], "pizType": [ "square" ] } } }

About

djongo (django+mongoDB) basic API endpoints

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages