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
Add judoscale-python to your requirements.txt
file:
judoscale-python >= 1.0.0.rc1
Then run this from a terminal to install the package:
pip install -r requirements.txt
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
Built Distribution
Close
Hashes for judoscale-python-1.0.0rc1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb5cc31b7eef161f2d6c9d0b1ddb9df317edb4d5c8160868ab441fde4984e558 |
|
MD5 | adb69b48a926769d8431d07cee4ad055 |
|
BLAKE2b-256 | 3f992e7b6e9a741d7f7529292dc6a59f6722163beed32fd280eee0f1ddbba72a |
Close
Hashes for judoscale_python-1.0.0rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb0902409a35659ac94dd67879d5ebd23eb09dbc2e96ff8511dc3f0c1aff07ca |
|
MD5 | 105011116dbdeaa931003d5fb2801afe |
|
BLAKE2b-256 | d6d1e9bd961f00077e232a035c2407d35bd3365d1f1c421eadab1c79d2800a65 |