Skip to content

eduhbg/fruit-api-django

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fruit API with Django

Overview

The project aims to study Django and Django Rest Framework in a pratical context.

image

Features

  • GET, POST, DELETE and PUT data with API

Running the project

Go to the project folder (cd .../fruit-api-django/) with your terminal and type:

sudo apt install python3-virtualenv
virtualenv env
source env/bin/activate
pip install django
pip install djangorestframework
python3 manage.py runserver

The project will run in localhost (http://127.0.0.1:8000/).

To see all the data, just make a request with the endpoint http://127.0.0.1:8000/fruits/ or http://127.0.0.1:8000/regions/.

To change or delete, just pass the id in the endpoint (http://127.0.0.1:8000/fruits/id/) and in the body (json) fill in with the text you want to change, such as the fruit name. If you want to delete, just fill the id in the endpoint.

Dependencies

  • Python - used version 3.8.10;
  • Virtualenv (sudo apt install python3-virtualenv);
  • Check out for more dependencies here.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages