title: Heroku cli - how to run a python function by command line?
body: <p>I have a Python project hosted on Heroku, and I am trying to run by command line (Heroku cli) a specific function inside my script. Is it possible? I have not found anything about this in Heroku documentation.</p>
  <p>Example:</p>
  <p>myfile.py</p>
  <pre><code>def hello_world():
   print(&quot;hi&quot;)
  </code></pre>
  <p>Command 1  (This works OK, but run all file):</p>
  <pre><code>$ heroku run python myfile.py
  </code></pre>
  <p>Command 2 (This is not working)</p>
  <pre><code>$ heroku run python myfile.py hello_world
  </code></pre>