title: Django global variable to store immutable object
body: <p>I'm trying to set up <code>python-telegram-bot</code> library in webhook mode with Django. That should work as follows: on Django startup, I do some initial setting of <code>python-telegram-bot</code> and get a <code>dispatcher</code> object as a result. Django listens to <code>/telegram_hook</code> url and receives updates from Telegram servers. What I want to do next is to pass the updates to the <code>process_update</code> method of the <code>dispatcher</code> created on startup. It contains all the parsing logic and invokes callbacks specified during setup.</p>
  
  <p>The problem is that the <code>dispatcher</code> object needs to be saved globally. I know that global states are <strong>evil</strong> but that's not really a global state because the <code>dispatcher</code> is immutable. However, I still don't know where to put it and how to ensure that it will be visible to all threads after setup phase is finished. So the question is how do I properly save the <code>dispatcher</code> after setup to invoke it from Django's <code>viewset</code>?</p>
  
  <p>P.S. I know that I could use a built-in web server or use polling or whatever. However, I have reasons to use Django and I anyway would like to know how to deal with cases like that because it's not the only situation I can imagine when I need to store an immutable object created on startup globally. </p>