This is the very basic version of REST API using Django framework of Python. This app contains the name and alais as the model and we have serialized them using REST API. This is the basic idea of REST API of Django, using the same concept you can make powerful APIs.
The Django's djangorestframework is very powerful tool for generating the rest API from our model. There are simple steps for creating the rest API in Django.
- Create a Model ( Here we have created a model "HERO" with Name and Alias )
- Create serailizers.py ( Here we define which model we want to work with and make a serializer class )
- Create a view for the Serliazer ( the framework does for you )
- Create a URL for the view