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
Release history Release notifications | RSS feed
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.2.tar.gz
(6.2 kB
view hashes)
Built Distribution
Close
Hashes for judoscale_python-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 536d039593e34c11722a914a6a6cda9133418842bded29f5e7d5a99a8f639fdf |
|
MD5 | 8c4e03ce960d6a9bd6000ac2e86ccc79 |
|
BLAKE2b-256 | 4cf8588286a4ec440744d2114c62557ccf95bb567fae6ffa0f20d4e271556a58 |