Skip to main content

django-pygwalker

Downloads

Maintainability OpenSSF Best Practices

PyPI - Python PyPI - Django

This utility creates user interfaces for visual analysis using PyGWalker in your django application. A PyGWalker page can be created from a Django queryset, a static csv file, or an uploaded csv file.

For more information on PyGWalker see the github repo available here: https://github.com/Kanaries/pygwalker


Code Quality

Workflow Description Status
Bandit security checks Bandit
Black code formatting Black
CodeQL security analysis CodeQL
Coveralls code coverage status Coveralls
Isort python import ordering Isort
Mypy static type checking Mypy
Pytest unit testing Pytest
Radon code complexity analysis Radon
Ruff static code analysis Ruff
Safety dependency scanner Saftey
Tox python/django versions testing Tox

Code Coverage

Coverage Status

Dashboard: https://coveralls.io/github/djangoaddicts/django-pygwalker


Documentation

Documentation Status

Full documentation can be found on http://django-pygwalker.readthedocs.org.

Documentation source files are available in the docs folder.


Installation

  • install via pip:

    pip install django-pygwalker
    
  • add the following to your INSTALLED_APPS in settings.py:

    djangoaddicts.pygwalker
    

    NOTE: adding djangoaddicts.pygwalker to INSTALLED_APPS is only required if you intend to use the built-in templates or the 'generic' PyGWalker view.

  • to include the generic PyGWalker view (creates the PyGWalker page from an upload of a csv file) add the following to your project-level urls.py:

    path("pygwalker/", include("djangoaddicts.pygwalker.urls"), ),
    

Features

PygWalkerView

The PygWalkerView renders a page containing PyGWalker html. This view takes a queryset parameter and includes all data in the queryset for visualizations. By default fields defined in the model will be included. To exclude fields or include additional fields (such as related fields), use the field_list parameter to specify exact fields desired for visualizations.

A Bootstrap 5 template is included, but can be overwritten using the template_name parameter.

Parameters

  • field_list: list of model fields to include (defaults to fields defined in the model)
  • queryset: queryset providing data available to visualization
  • theme: PyGWalker theme to use for pyg html (defaults to "media")
  • title: title used on html render
  • template_name: template used when rendering page; (defaults to pygwalker/bs5/pygwalker.html)

Usage Examples

from djangoaddicts.pygwalker.views import PygWalkerView

class MyPygWalkerView(PygWalkerView):
    queryset = MyModel.objects.all()

Explicitly Defined Fields

from djangoaddicts.pygwalker.views import PygWalkerView

class MyPygWalkerView(PygWalkerView):
    queryset = MyModel.objects.all()
    title = "MyModel Data Analysis"
    theme = "light"
    field_list = ["name", "some_field", "some_other__related_field", "id", "created_at", "updated_at"]

Custom Template

Custom views/templates can be used to override the Bootstrap 5 templates provided by default view. Here is an example:

from djangoaddicts.pygwalker.views import PygWalkerView

class MyPygWalkerView(PygWalkerView):
    queryset = MyModel.objects.all()
    template_name = "my_custom_template.html"

License

django-pygwalker is licensed under the GNU-3 license (see the LICENSE file for details).

https://github.com/djangoaddicts/django-pygwalker/blob/main/LICENSE


Contributing

To contribute to django-pygwalker, please see Contributing

Metadata

Release files for django-pygwalker 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-pygwalker 0.0.9
File Size Uploaded Provenance Actions
django_pygwalker-0.0.9.tar.gz 47.4 kB Without provenance Details for django_pygwalker-0.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-pygwalker 0.0.9
File Interpreter ABI Platform Actions
django_pygwalker-0.0.9-py3-none-any.whl Python 3 none any Details for django_pygwalker-0.0.9-py3-none-any.whl

Total release size: 82.9 kB

Release files / django_pygwalker-0.0.9.tar.gz

Download URL django_pygwalker-0.0.9.tar.gz
Size 47.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f816ec074aeb0a95252cd819221f91374ba8823780255885afd51c8e9cc61274
BLAKE2b-256 checksum
How to use checksums
7defa77308050614cdafd7a3806c71c4b043cc6a3e2248ca23842045a04b1ef6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / django_pygwalker-0.0.9-py3-none-any.whl

Download URL django_pygwalker-0.0.9-py3-none-any.whl
Size 35.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f12b72995e39c2244b47a2af49a29c9ccf3ba11ff1036752c82e8ef5ff271c05
BLAKE2b-256 checksum
How to use checksums
cacaa74e570a9bb42b8ee74a56abd66ae72e89ccc36db23b9a91b7ee58e735e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Security for django-pygwalker 0.0.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page