title: Python script communicate via websockets to Django Channels
body: <p>Looking for some guidance or advice.</p>
  
  <p>I have Django channels set up on my webserver that allows two users to chat between each other using redis and websockets. </p>
  
  <p><strong>How do I setup a standalone python script, so that it can communicate and take commands via websocket messages sent by a user in Django</strong>.</p>
  
  <p>The goal is to have this standalone python script  be controlled via a Django channels websockets. The python script runs a physical motor, so some example functions would be Start() and Stop().</p>
  
  <p>Edit: Looks like what I want is to setup celery to control the python script, but have django channels control the celery application on when t to start and stop:<a href="https://vincenttide.com/blog/1/django-channels-and-celery-example/" rel="nofollow noreferrer">https://vincenttide.com/blog/1/django-channels-and-celery-example/</a></p>