Getting Started with Python Applications

Its an easy, two step process to get started with Dynoscale.

Install the Agent Library

In your development environment run python -m pip install dynoscale. Then in your gunicorn.conf.py import request hook:


      # This one line might do it for you ...
      from dynoscale.hooks.gunicorn import pre_request  # noqa # pylint: disable=unused-import
    

or in case you already use Gunicorn hooks:

      from dynoscale.hooks.gunicorn import pre_request as hook
      # ... or if you have your own hooks, remember to call our hook
      # afterwards otherwise dynoscale agent will not be notified when
      # this on each request!
      def pre_request(worker, req):
         hook(worker, req)
      # ...do your own thing...
    

Finally, deploy your application to Heroku.

Install Addon

There are two ways to install the addon. If you are comfortable with the heroku CLI run heroku addons:create dscale. Next, run heroku addons:open dscale to launch your Dynoscale Dashboard.

Alternatively, you can navigate to the Resource tab of your Heroku application. Scroll down to the Addon section and type dynoscale. Select your desired plan type and click on the "Submit Order Form" button.

Was this page helpful?

3 people found this page helpful so far!