GitPedia

REST API Basics

This is a basic guide on how to build a REST API with Django & Python. For much deeper depth, check out our new course on REST API: (https://kirr.co/90kxtx)

From codingforentrepreneurs·Updated March 31, 2026·View on GitHub·

This is a basic, and rapid fire, guide on how to build a REST API with Django & Python. For much deeper depth and understanding, check out our new course on [REST API](https://kirr.co/rfqyre). The project is written primarily in Python, distributed under the MIT License license, first published in 2017. Key topics include: basics, django, django-rest-framework, djangorestframework, djangorestframework-jwt.

Rest API Basics LOGO

REST API Basics

This is a basic, and rapid fire, guide on how to build a REST API with Django & Python. For much deeper depth and understanding, check out our new course on REST API.

Software

Initial Setup

virtualenv -p python3 restapi-basics

# activate it 
# mac: `source bin/activate`
# windows: `.\Scripts\activate`

pip install django==1.11.8 djangorestframework==3.7.3 djangorestframework-jwt==1.11.0

mkdir src && cd src

django-admin startproject cfehome .
django-admin startapp postings

Update your settings to reflect the following:

INSTALLED_APPS = [
    ...
    'rest_framework',
    'postings'
]



REST_FRAMEWORK = {
    'DEFAULT_PERMISSION_CLASSES': (
        'rest_framework.permissions.IsAuthenticated',
    ),
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
        'rest_framework.authentication.SessionAuthentication',
        'rest_framework.authentication.BasicAuthentication',
    ),
}

Contributors

Showing top 1 contributor by commit count.

View all contributors on GitHub →

This article is auto-generated from codingforentrepreneurs/REST-API-Basics via the GitHub API.Last fetched: 6/27/2026