title: Running Heroku CLI commands through a python script
body: <p>I am looking to run commands I typically would run through Heroku CLI via a python script, namely:</p>
  <pre><code>heroku pg:backups:capture
  </code></pre>
  <p>Historically, for running Heroku commands in Python I have used <a href="https://github.com/martyzz1/heroku3.py" rel="nofollow noreferrer">Heroku3.py</a>, which works for me for things like restarting dynos.  I am having difficulty finding a way to execute commands for addons, such as the one listed above.</p>
  <p>Is there a way to call CLI commands through python?</p>