Giter Club home page Giter Club logo

django-rest-template's Introduction

Task management REST API template

This REST API powered by Django REST allows users to create, update and list tasks on a simple TODO manager app.

The main purpose of this project is to server as template for future Django REST APIs.

Libraries and frameworks:

  • Python 3.7
  • Django REST framework 3.9.0

Endpoints

  • GET /task list all tasks
  • GET /task/[id] get task by id
  • POST /task create new task
  • PUT /task/[id] update an existing task
  • DELETE /task/[id]

Extra endpoints for monitoring, useful when implementing a complex microservice stack:

  • GET / return status and name of the app
  • GET /ping pong

Features

  • Full REST API on Django REST
  • Database migrations
  • Status endpoints
  • Postgres database on docker when running server
  • Swagger doc

  • Django admin

  • Friendly Django REST interface on the browser

Project structure

This is the structure of the modules in the project, it follows the standard Django REST file naming, based on the model-view-controller pattern.

Things to do next

This is a list of this that should be done before moving to a full environment.

  • Add security to API (uses profiles, access token, private network...)
  • Version API
  • Add error reporting system (eg: Sentry)
  • continuous integration / continuous deploy
  • BDD

Testing

docker-compose run todo python manage.py test

Run the server

Before running the server, you will need to be running a postgres instance with a todo database, you can run it on your machine using docker with

dc run --service-ports todo

Sample usage: create a task

PK id UUID is generated automatically

curl -X POST http://localhost:8000/task -H "Content-Type: application/json" -d'{ "title":"New task" }'

django-rest-template's People

Contributors

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