Requirements
Django REST Framework requires the following versions:Python
3.10, 3.11, 3.12, 3.13, 3.14
Django
4.2, 5.0, 5.1, 5.2, 6.0
We highly recommend and only officially support the latest patch release of each Python and Django series.
Install Django REST Framework
Install using pip
Install the core package:You can also install optional packages for additional features:
Add to INSTALLED_APPS
Add
'rest_framework' to your INSTALLED_APPS setting in settings.py:settings.py
Optional Packages
Django REST Framework supports several optional packages that enhance functionality:Schema Generation
Schema Generation
For automatic schema generation support:
- PyYAML (5.1+) - YAML support for schemas
- uritemplate (3.0.0+) - URI template parsing
Browsable API Enhancement
Browsable API Enhancement
For enhanced browsable API with syntax highlighting:
- Markdown (3.3.0+) - Markdown support for the browsable API
- Pygments (2.7.0+) - Syntax highlighting for code blocks
Filtering & Permissions
Filtering & Permissions
For advanced filtering and object-level permissions:
- django-filter (1.0.1+) - Advanced filtering support
- django-guardian (1.1.1+) - Object-level permissions
Global Configuration
You can configure global settings for your REST framework API by adding aREST_FRAMEWORK dictionary to your settings.py:
settings.py
Install from Source
If you want to work with the latest development version, you can clone the repository:Verify Installation
You can verify your installation by running the Django shell:Next Steps
Quick Start
Build your first API in minutes
Tutorial
Learn REST framework step by step
