Declarative D3.js visualizations for Django — charts, maps, networks, with MQTT live updates
Project description
django-d3-bridge
Declarative D3.js visualizations for Django — charts, maps, networks, with MQTT live updates.
Write Python, render D3.js. No JavaScript required.
Documentation | GitHub | PyPI
Install
pip install django-d3-bridge
Quick Start
# settings.py
INSTALLED_APPS = [
...
"d3_bridge",
]
# views.py
from d3_bridge import BarChart
def dashboard(request):
chart = BarChart(
data=Product.objects.values("name", "sales"),
x="name", y="sales",
title="Sales by Product",
)
return render(request, "dashboard.html", {"chart": chart})
{% load d3_bridge %}
{% d3_scripts %}
<div class="col-md-6">
{% d3_render chart %}
</div>
19 Chart Types
| Category | Charts |
|---|---|
| Basic | Bar, Line, Area, Pie, Donut, Scatter |
| Geographic | Choropleth Map, Bubble Map |
| Network | Force Graph, Sankey, Chord Diagram |
| Hierarchy | Tree, Treemap, Circle Packing, Sunburst, Dendrogram |
| Statistical | Contour Plot, Density Plot, Voronoi Diagram |
3 Data Modes
- Static — QuerySet evaluated at each page load
- Polling — auto-refresh via HTTP fetch every N seconds
- MQTT — real-time push via WebSocket
# Polling example — no WebSocket, no infrastructure
chart = LineChart(
data=initial_data,
x="timestamp", y="value",
poll_url="/api/chart/data/",
poll_interval=30,
)
Features
- Pure D3.js v7 output — inspectable, no abstraction layer
- Django QuerySet + GeoQuerySet + DataFrame serialization
- 4 themes (default, dark, bootstrap, terraf) + 7 color palettes
- Responsive, animated, with tooltips
- Bootstrap grid compatible
- Escape hatch for custom D3.js code
Documentation
Full documentation with examples for every chart type:
https://altius-academy-snc.github.io/django-d3-bridge
License
MIT — Paul Guindo / Altius Academy SNC
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_d3_bridge-0.1.1.tar.gz.
File metadata
- Download URL: django_d3_bridge-0.1.1.tar.gz
- Upload date:
- Size: 58.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4eee978e7dc0b3bb3af8c43be9656d4eff0a82416a762f2bd5ce4bb490de71ee
|
|
| MD5 |
018b8a37e206a595eb6996f37758b700
|
|
| BLAKE2b-256 |
9034f377f2549eaab9776706ca24c0258607e92f7482d467e1a0a9c7df2130a5
|
Provenance
The following attestation bundles were made for django_d3_bridge-0.1.1.tar.gz:
Publisher:
publish.yml on Altius-Academy-SNC/django-d3-bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_d3_bridge-0.1.1.tar.gz -
Subject digest:
4eee978e7dc0b3bb3af8c43be9656d4eff0a82416a762f2bd5ce4bb490de71ee - Sigstore transparency entry: 1113622411
- Sigstore integration time:
-
Permalink:
Altius-Academy-SNC/django-d3-bridge@005b0806d7ae3fe8a4fb7d2562ede46b13d38cd7 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Altius-Academy-SNC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@005b0806d7ae3fe8a4fb7d2562ede46b13d38cd7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file django_d3_bridge-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_d3_bridge-0.1.1-py3-none-any.whl
- Upload date:
- Size: 53.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b208ffd58221edad7c75b235cb1f8033789d6d568ce21e7792744b17abec575
|
|
| MD5 |
317bd69098aeba280fc7a34c4e4d4a01
|
|
| BLAKE2b-256 |
bc79e56079357f0fa49a7d48821af12fff6b8ef985af5e9c582d9a6f60bccde6
|
Provenance
The following attestation bundles were made for django_d3_bridge-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on Altius-Academy-SNC/django-d3-bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_d3_bridge-0.1.1-py3-none-any.whl -
Subject digest:
1b208ffd58221edad7c75b235cb1f8033789d6d568ce21e7792744b17abec575 - Sigstore transparency entry: 1113622445
- Sigstore integration time:
-
Permalink:
Altius-Academy-SNC/django-d3-bridge@005b0806d7ae3fe8a4fb7d2562ede46b13d38cd7 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Altius-Academy-SNC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@005b0806d7ae3fe8a4fb7d2562ede46b13d38cd7 -
Trigger Event:
release
-
Statement type: