title: Problem enabling Uvicorn auto-restart when launching programmatically with uvicorn.run
body: <p>I'm attempting to get Uvicorn to automatically restart on detected file changes when launching programmatically, as it would when started from the command line with the <code>--debug</code> switch. The following statement is at the bottom of my api source code file and while Uvicorn starts and runs fine, it doesn't launch in reload mode. I've tried setting the debug parameter to various diffrent values: <code>uvicorn.run(debug=</code> 'true', 'True', 'yes' and True (python boolean), but nothing seems to work.</p>
  
  <pre><code>uvicorn.run(app,
              host=run_config['api_host'],
              port=run_config['api_port'],
              log_level=run_config['log_level'],
              debug='true')
  </code></pre>
  
  <p>EDIT: In reference to my comment on @howderek's answer: I've tried a modified version of the suggested code. While the server successfully starts, the code below doesn't turn on the reloader:</p>
  
  <pre><code>import uvicorn
  from uvicorn.reloaders.statreload import StatReload
  reloader = StatReload('debug')
  reloader.run(uvicorn.run(app, host='localhost', port=9187, debug='true'))
  </code></pre>