Skip to main content

Official Python adapter for Judoscale—the advanced autoscaler for Heroku

Project description

judoscale-python

This is the official Python adapter for Judoscale. You can use Judoscale without it, but this gives you request queue time metrics and job queue time (for supported job processors).

Installation

pip install judoscale-python

Supported web frameworks

  • Django
  • Flask
  • FastAPI

Supported job processors

  • Celery
  • RQ

Using Judoscale with Django

Add Judoscale app to settings.py:

INSTALLED_APPS = [
    "judoscale.django",
    # ... other apps
]

Customize Judoscale options in settings.py (optional):

JUDOSCALE = {
    # LOG_LEVEL defaults to ENV["LOG_LEVEL"] or "INFO".
    "LOG_LEVEL": "DEBUG",

    # API_BASE_URL defaults to ENV["JUDOSCALE_URL"], which is set for you when you install Judoscale.
    # This is only exposed for testing purposes.
    "API_BASE_URL": "https://example.com",

    # REPORT_INTERVAL_SECONDS defaults to 10 seconds.
    "REPORT_INTERVAL_SECONDS": 5,
}

Once deployed, you will see your request queue time metrics available in the Judoscale UI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

judoscale-python-0.0.3.tar.gz (6.3 kB view hashes)

Uploaded Source

Built Distribution

judoscale_python-0.0.3-py3-none-any.whl (7.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page