Skip to content

felipeozalmeida/pizzaria-ramos-api

Repository files navigation

pizzaria-ramos-api

A small Django API to manage pizzas.

Quick setup

Just issue a pipenv install, another python manage.py migrate and you're good to python manage.py runserver!

In order to store data, it uses a local SQLite database file. No need to mess with your system :)

APIs

As everything is graciously generated by Django REST Framework's ViewSets, this application features the following routes:

  1. GET /pizzas/ - list all pizzas
  2. GET /pizzas/ - retrieve pizza by ID
  3. GET /pizzas/?search= - search pizzas by name (case-insensitive)
  4. POST /pizzas/ - creates a new pizza
  5. PATCH /pizzas/ - updates a pizza (partial, you just need to send what you want to change)
  6. PUT /pizzas/ - updates a pizza (full, you need to send everything)
  7. DELETE /pizzas/ - deletes a pizza

Dependencies

  • Django==2.2.6 (core library for everything :)
  • django-cors-headers==3.1.1 (to allow web apps to consume API in localhost)
  • djangorestframework==3.10.3 (our API generator S2)
  • Pillow==6.2.0 (to enable image uploading)
  • pkg-resources==0.0.0 (don't know shit)
  • pycodestyle==2.5.0 (needed for "Format code" command in VS Code to work)
  • pytz==2019.3 (also don't know shit)
  • sqlparse==0.3.0 (...)