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

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.1.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: django-dramatiq-charts-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 22f106368bca1187c8118b6e16be56ccf7f34580f376d9391855825a7979871f
MD5 64888a5392b0310b81c47a1e2376f4ef
BLAKE2b-256 20f90821fbb031e7c6bfddbeb73e786bf65809c3aadf023f90abb59b5c9bd973

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_dramatiq_charts-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dbef9f2619159ede32c0dbb50d151393a95320dcac0ae6c2cb64b4a4d8572305
MD5 92791ddc10038cad8df1ea64251e7ae7
BLAKE2b-256 0e5cfaa8e4361d0842a00f3acac4fd052975b27cc05afbecd7a80d910a084c8e

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