Skip to main content

Charts for django_dramatic

Project description

Draw charts by django_dramatiq task history in db.

Chart types: load and timeline.

https://img.shields.io/pypi/dm/django_dramatiq_charts.svg?style=social

Python version

3.6+

License

Apache-2.0

PyPI

https://pypi.python.org/pypi/django_dramatiq_charts/

Installation

$ pip install django-dramatiq-charts

Requirements:

  • Django 2.2+

  • dramatiq 1.11+

  • django-dramatiq 0.10.0+

Guide

Configuration

  1. Add django_dramatiq_charts to installed apps after django_dramatiq app:

INSTALLED_APPS = [
    'django_dramatiq',
    'django_dramatiq_charts',
    'my_app',
    # ...
]
  1. Add lib views to your urls:

from django_dramatiq_charts.views import load_chart, timeline_chart, clean_cache

urlpatterns = [
    path('django_dramatiq_charts/load_chart/', load_chart, name='ddc_load_chart'),
    path('django_dramatiq_charts/timeline_chart/', timeline_chart, name='ddc_timeline_chart'),
    path('django_dramatiq_charts/clean_cache/', clean_cache, name='ddc_clean_cache'),
    # ...
]
  1. Configure lib in your project settings file:

Parameter

Description

Default

DJANGO_DRAMATIQ_CHARTS_PERM_FN

users with access to the charts

def fn(request): return request.user.is_superuser

DJANGO_DRAMATIQ_CHARTS_LOAD_QS_FILTER

Additional queryset filter for load chart

None

DJANGO_DRAMATIQ_CHARTS_TIMELINE_QS_FILTER

Additional queryset filter for timeline chart

None

DJANGO_DRAMATIQ_CHARTS_CACHE_FORM_DATA_SEC

Minutes to cache choices of queue and actor form fields (False-like to disable)

4 hours

Load chart

Shows the number of simultaneously executed actors in each time interval on timeline

docs/load_chart.png

Tasks running more than one day are not counted (assumed to be an error).

Timeline chart

Shows actors on timeline

docs/timeline_chart.png

If the task duration is less than a second, this task is displayed on the chart with a duration of 1 second.

Release notes

History of important changes: release_notes.rst

Thanks

Thanks to all who helped develop this library:

MilkyCake, lexa2907, python, django, plotly, jquery, select2, flaticon.com

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

django-dramatiq-charts-0.2.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

django_dramatiq_charts-0.2.0-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file django-dramatiq-charts-0.2.0.tar.gz.

File metadata

  • Download URL: django-dramatiq-charts-0.2.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.5

File hashes

Hashes for django-dramatiq-charts-0.2.0.tar.gz
Algorithm Hash digest
SHA256 09b637d486456fb4c30033f6a77ed2554ce8c862ca8d755470aa6baa312a8c14
MD5 29392eec60cf15c2e3985fffebd8e079
BLAKE2b-256 8ce81ced7e772bb749f96ce3f7c3e966a443cbcf15496b6f437deafc9127a7fb

See more details on using hashes here.

File details

Details for the file django_dramatiq_charts-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: django_dramatiq_charts-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.5

File hashes

Hashes for django_dramatiq_charts-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 878596a656007efe3be6ce79bff679e1495743341a32e04c063212cc5945ea41
MD5 953d1f999a04c5cfdc65037dd2a3167c
BLAKE2b-256 2309c0fcd503cd6cf3ef10aab3a323047d0423355c92a40977b6aa652c564270

See more details on using hashes here.

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