DRF Viewsets in 100 words

Before starting to use viewsets, I would recommend becoming familiar with class based views, as they are similar in structure in that they are a python class rather than a function.

With that aside out of the way, you might guess from the name, that a viewset is a set of views. They are used to group related views for a resource, namely the common CRUD actions for a resource using predefined urls defined by a DRF Router.

A viewset expects methods to be defined either via inheritance as is the case of the ModelViewSet or directly on the viewset itself. These methods are be list, retrieve, create, update and destory.

A final note is that viewsets are designed to reduce the amount of boilerplate code required to wire up urls to views to serializers and ought to be used only once your comfortable with them and that logic involved is trivial. For complex individual APIs stick to simpler class based or function based views