Install Django REST Framework on Ubuntu

Django REST framework is a powerful and flexible toolkit for building Web APIs. Some reasons you might want to use REST framework:

Following post details about how you can get started with simple helloproject example to setup DJANGO REST Framework.

$ mkdir workspace
$ cd workspace
$ sudo apt-get install python3-venv

Following command, Creates a new virtual environment by running,

$ python3 -m venv PATH_TO_CREATE_ENVIRONMENT_DIRECTORY

Note: You can set any directory for virtual environment, lets say we want to create environment in current directory, then you can use below command but if you want create environment in “/home/devlab/virtualenvs” directory, the below command will be “python3 -m venv /home/devlab/virtualenvs”

$ python3 -m venv env

The final step in setting up your virtual environment is to activate it:

$ source env/bin/activate

Now, we need to install “django” and “django rest framework” using below command,

(env)$ pip install django
(env)$ pip install djangorestframework

With these steps we have installed Django and Django REST Framework development environment software to actually start development to create our REST API’s.

Related :   What is routers in Django REST Framework ?

To continue next with developing your first REST API, please refer to next post “Developing first REST API using Django Rest Framework ( DRF )”


lynxbee_ezoic

Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )

   


1 thought on “Install Django REST Framework on Ubuntu”

Leave a Comment

Android Android Applications Android Build system Android Commands Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded