title: How to run python script simultaneously when user input in Django REST api?
body: <p>I am very new in Django REST API and Python.
  I have python script. and I created simple Django REST API for getting input from users. </p>
  
  <p>Now I want to do when user give input through Django REST API then after run my python script with it. so I want to integrate my python script with Django REST API.</p>
  
  <p>I tried to do googling but Not able to understand because in some forum they use <code>subprocess</code> and in some forum given <code>REQUEST</code> function. I am confuse and not able to understand.</p>
  
  <p>my <strong>view.py</strong> file as follows:</p>
  
  <pre><code>from django.shortcuts import render
  
  from rest_framework import viewsets
  from . models import input_params
  from . serializers import input_paramsSerializer
  
  class inputViewSet(viewsets.ModelViewSet):
  
      queryset = input_params.objects.all()
      serializer_class = input_paramsSerializer 
  </code></pre>
  
  <p><strong>url.py</strong> file</p>
  
  <pre><code>from django.contrib import admin
  from django.conf.urls import url,include
  from base_search.views import inputViewSet
  from rest_framework import routers
  
  router = routers.DefaultRouter()
  router.register(r'input',inputViewSet)
  
  urlpatterns = [
      url(r'^admin/', admin.site.urls),
      url(r'^',include(router.urls))
  ]
  </code></pre>
  
  <p><strong>Question1</strong></p>
  
  <p>Now can anyone please tell me How can I connect my python script here?</p>
  
  <p><strong>Question2:</strong></p>
  
  <p>if I just connect my python script at endpoint so will it take automatically user input data from Django REST API and run my python script?</p>
  
  <p>If anyone have good example please let me know.</p>