django-rest-framework
Awesome web-browsable Web APIs.
When to Use
- Build Python applications with django-rest-framework
- Make HTTP requests
When NOT to Use
- Projects using TypeScript or Rust (different ecosystem)
Quick Start
Install
INSTALLED_APPS = [
# ...
"rest_framework",
]
Examples
Let's take a look at a quick example of using REST framework to build a simple model-backed API for accessing users and groups.
Start up a new project like so...
pip install django
pip install djangorestframework
django-admin startproject example .
./manage.py migrate
./manage.py createsuperuser
Now edit the example/urls.py module in your project:
from django.contrib.auth.models import User
from django.urls import include, path
from rest_framework import routers, serializers, viewsets
## Project Info
- **Language:** Python, JavaScript
- **Tests:** Yes
## File Structure
├── docs/ │ ├── api-guide/ │ ├── community/ │ ├── img/ │ ├── theme/ │ ├── topics/ │ ├── tutorial/ │ ├── CNAME │ └── index.md ├── licenses/ │ ├── bootstrap.md │ └── jquery.json-view.md ├── rest_framework/ │ ├── authtoken/ │ ├── locale/ │ ├── management/ │ ├── schemas/ │ ├── static/ │ ├── templates/ │ ├── templatetags/
Generated by repo2skill
Source: NeuZhou/repo2skill — distributed by TomeVault.