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 lib views to your urls:

from django_dramatiq_charts.views import load_chart, timeline_chart, clean_cache

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 parameters 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_CHART_QS

Custom queryset for load chart

None

DJANGO_DRAMATIQ_CHARTS_TIMELINE_CHART_QS

Custom queryset 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 depicted 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, 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.1.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: django-dramatiq-charts-0.1.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.2.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.5

File hashes

Hashes for django-dramatiq-charts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c60112363f4c32e90e47d5a37f686ed6db866215e9f5a8a40ac6ed24e94e5a59
MD5 deb3b45ba7dbbd61567c23d9e42730cc
BLAKE2b-256 96008d9eba01d5f338635e77c8d292fe49ad8e4d21113b874c5fd6d7f5b5ad18

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_dramatiq_charts-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.2.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.5

File hashes

Hashes for django_dramatiq_charts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3fb71a477dc1a8333eb933f0a5d146a3b775b44af70a5c733a584601e7b2ff83
MD5 a0ccdf69bc7dacba184418b12c98cfff
BLAKE2b-256 ea35a6d0a675082b0868b6d260db10b359a85c1f17445ea4cf903fc669f825bd

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