Skip to content

nahuelr/NTDSoftware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

For a better experience, please view this file using a markdown viewer.

Django CRUD API

This project aims to retrieve data from an external source, store it in an appropriate database structure, and create a CRUD RESTful API to interact with the database.

It uses Django Rest Framework to create the API including the CRUD endpoints.

Table of Contents

Objectives

  1. Retrieve data from the GraphQL endpoint:
    https://swapi-graphql.netlify.app/.netlify/functions/index
    using a Modular Query Methodology.
    You can visualize the data shape here.
  2. Store the obtained data from the GraphQL endpoint into the database and create appropriate models.
  3. Write RESTful Create, Read, Update, and Delete endpoints to interact with the database.

Requirements

  • Poetry is used to manage the dependencies.

Installation

  • Run poetry install to install the dependencies.

Usage

  • Run poetry shell to activate the virtual environment.
  • Run python manage.py runserver to start the server.
  • Open:

Endpoints

All endpoints are prefixed with /api/. All endpoints adhere to the RESTful API format.

List of endpoints:

  • List Endpoint (GET) - Retrieve a list of all instances of the model.
    • example: GET /api/planet/
  • Detail Endpoint (GET) - Retrieve details of a specific instance of the model.
    • example: GET /api/planet/{pk}
  • Create Endpoint (POST) - Create a new instance of the model.
    • example: POST /api/planet/
  • Update Endpoint (PUT) - Update a specific instance of the model using a complete representation.
    • example: PUT /api/planet/{pk}
  • Partial Update Endpoint (PATCH) - Update a specific instance of the model using a partial representation.
    • example: PATCH /api/planet/{pk}
  • Delete Endpoint (DELETE) - Delete a specific instance of the model.
    • example: DELETE /api/planet/{pk}

Technologies

  • Python 3.11.3
  • Django 4.2.4
  • Django REST Framework @latest
  • Poetry 1.4.2
  • SQLite
  • django_mysql

Out of Scope

  • Authentication and Authorization.
  • Testing.
  • Deployment.
  • Frontend.
  • Dockerization.
  • CI/CD.
  • Documentation.
  • Logging.
  • Caching.
  • Rate Limiting.
  • Filtering.
  • Versioning.
  • Monitoring.
  • Security.
  • Performance. (partially done)
  • Scalability.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages