How to Create a REST API in Django

REST is an acronym that starts for REpresentational State Transfer. It’s a dynamic system based around giving the user what he or she needs at any particular point in time, allowing a system to take in a wide range of data and generate outputs based on what is required. Building a REST API in Django isn’t as hard as it seems, especially since Django is already a web-based framework. Getting from framework to API isn’t complicated, but there’s a lot of places where one can trip up. This overview assumes that you’ve already installed Django and understand how to create a new project as well as have a basic working knowledge of Django.

Hierarchy and Django for REST

In Django, there are different levels of interface. At the top is the Django project. From the project, you can then create a new app which will use your REST API. This API is best used in a project that has a lot of calls to and from the backend. After creating the app, the next step would be to create a couple of models for use with our REST API app. You can use the standard models or use models that you code yourself, whichever one is more viable for your app. If you have a lot of custom classes, then coding the models yourself might be a more valid approach.  Your models would take the shape of typical classes like: https://goo.gl/zYksm7 #DataIntegration #ML

Subscribe To Newsletter

Sign up for my newsletter and get the latest technology news

2019 © Craig Brown PhD. All rights reserved.