Native Python bindings for d2lang, the modern text-to-diagram language. Compile D2 diagram source code to SVG directly from Python — no CLI tools or subprocesses required.
Includes built-in Analog Devices (ADI) libraries for signal-chain shapes, software/AI architecture diagrams, pyadi-jif block diagrams, and ADI DataX overview diagrams, plus light and dark ADI-branded themes.
Quick Start
import d2
# Basic diagram
svg = d2.compile("x -> y -> z")
# ADI signal chain with branded theme
svg = d2.compile("""
sensor: ADXL345 { class: sensor }
amp: LT6230 { class: amplifier }
adc: AD7606 { class: adc }
dsp: ADSP-21489 { class: dsp-fpga }
sensor -> amp -> adc -> dsp
""", adi=True)
# Dark theme variant
svg = d2.compile(code, adi=True, theme="dark")
# ADI DataX overview-style stack diagram
svg = d2.compile("""
direction: down
stack: ADI DataX Stack { class: datax-panel
apps: Applications { class: datax-application }
lib: libiio / pyadi-iio { class: datax-info }
drivers: Linux IIO Drivers { class: datax-driver }
hardware: ADI Hardware { class: datax-hardware }
apps -> lib -> drivers -> hardware { class: datax-flow }
}
""", library="datax")
Installation
pip install pyd2lang-native
Pre-built wheels are available for Linux (x86_64, aarch64), macOS (Intel, Apple Silicon), and Windows.
Documentation
Full documentation is available at the project docs site.
License
This project is licensed under the MPL-2.0 License. See the LICENSE file for details.
Dependencies
The d2lang compiler is built as a native shared library (.so / .dll / .dylib) and bundled into platform-specific Python wheels.
- d2lang: Project repo and License
Metadata
Release files for pyd2lang-native 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 262.8 MB
Release files / pyd2lang_native-0.1.9-cp314-cp314-win_amd64.whl
| Download URL | pyd2lang_native-0.1.9-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 14.7 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
78fcb6987a232f3283ed6f81973557e81bd3c2021fa8264c37ea0cbc26785636
|
|
BLAKE2b-256 checksum How to use checksums |
1b4485ac92d9385d1fad935920c1c09ff5f6a9d098c4cc7f803d820f0ee969fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pyd2lang_native-0.1.9-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 13.7 MB |
| Tags | CPython 3.14 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
c44bfc2f16944408a62ddaaefb150d203f83808905c2f3761d06fd08a4a120c0
|
|
BLAKE2b-256 checksum How to use checksums |
60ab0a65db2ed45cfd54df86567fc8564b1acbb9ee9ccffe5f0c8b57d6655e65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | pyd2lang_native-0.1.9-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 14.6 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
8bcbbedb15179c46cc0181bb5fa8651ffeda6fbaf97a2a5dc88086621f6f9bad
|
|
BLAKE2b-256 checksum How to use checksums |
a814a9b4d23b184aac386e9ef9c32686e46a329924809e71fb0c9f3c04b0f02a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | pyd2lang_native-0.1.9-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.7 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7a2bac86ebf8b7dadfa4b12065d3c5b6d51df5f5d97b5f9ff4b0a8e62dff1c96
|
|
BLAKE2b-256 checksum How to use checksums |
d0caec3b2033eb3a5f14f19421fad5e58d811ab496452d1c1005652a5e36b0db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp313-cp313-win_amd64.whl
| Download URL | pyd2lang_native-0.1.9-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 14.5 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
61b120ad00afa9d9b7e439d34e3f5ed96772c9567d9cd94adf836183b65f3652
|
|
BLAKE2b-256 checksum How to use checksums |
cd929e28780bcdb9c5ef452a960b7bbb59f98a1a7df979205764bd6c7545d004
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pyd2lang_native-0.1.9-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 13.7 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
f367d839000ccdeccdb201d8c77071b05fe6a225fd2d91c55dfcb1d6f01d0480
|
|
BLAKE2b-256 checksum How to use checksums |
619577bc0418b5009bb82d06588898e24c26a2697ccd9ee869fec971563ee7ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | pyd2lang_native-0.1.9-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 14.6 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
39f88f137cd1e1f0b8a15cccc85585636f5b83536d2ec86148545758addd828b
|
|
BLAKE2b-256 checksum How to use checksums |
6fe8ed62f2e290666268ac43546478dd7fa5bc269bfe9cb6dfe6b86b7466784e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | pyd2lang_native-0.1.9-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.7 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c5785b67e469ca520a7fd64ec7fc2427ae88db27121ed4631fdb47f727ef1272
|
|
BLAKE2b-256 checksum How to use checksums |
d221e4cf158a9a2df72d9b04f45c6621d4f9a8a938ff205e4041926280390582
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp312-cp312-win_amd64.whl
| Download URL | pyd2lang_native-0.1.9-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 14.5 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
305bafafb0fa74cd3c6af2189e53f3694128de5407c12bb9cfc133e2d7514ccc
|
|
BLAKE2b-256 checksum How to use checksums |
216590976ab32df0ea6304ff7ed30c418e511c0b4d0f7130d0fdd99fd6a0e0b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pyd2lang_native-0.1.9-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 13.7 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
6aac5e27afdfa650dd389f30961bf99986436fd05e9260cec24a34feab88fbfc
|
|
BLAKE2b-256 checksum How to use checksums |
cace7a36ed995c01508394dea563d968906e85468394f6c5987eb46969955616
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | pyd2lang_native-0.1.9-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 14.6 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
78c6598f3ca8324398540b76931c67aaf562eea8fef0f0906a50c8d77b5924c0
|
|
BLAKE2b-256 checksum How to use checksums |
916567344e69e9893e042a8fdb7a180741cfb68ce570e5ba91cf9fc696c83637
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | pyd2lang_native-0.1.9-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.7 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
57fd4dce22dfbd9619aa0c6f02569edf498c06d825fc6f39c921c434efed6412
|
|
BLAKE2b-256 checksum How to use checksums |
ce4b976f2a557a3de3f8bfcadde2f43d017383533cb3f1daaab7eddc8a298816
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp311-cp311-win_amd64.whl
| Download URL | pyd2lang_native-0.1.9-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 14.5 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
85a0d7c6ec4e6d1929a5e687236fd2845d41da1d41180d182692360f367426e3
|
|
BLAKE2b-256 checksum How to use checksums |
6aa41b073436980e063147bfe8f1b7c99caf606a4e36bc82cf4304390f6dbb79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pyd2lang_native-0.1.9-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 13.7 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
bf7403b32dd90ec0c4ee0ab22c24abbf7b1a2f2d9fb3ff2cf16751c4def6d13d
|
|
BLAKE2b-256 checksum How to use checksums |
e12bdafcae0a08c460ccbce2af3ca03c80881a8652914033843b6ba583b28667
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | pyd2lang_native-0.1.9-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 14.6 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
8f444906e1de435af28225689dbdd3f258f1d6961655b617ae2b785ca7b08263
|
|
BLAKE2b-256 checksum How to use checksums |
c8c20a4ccd83ee061564f2b532bd5774ebd83339363551d87b8a6c3889ff5eff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | pyd2lang_native-0.1.9-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.7 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
eb5cc2ede256c888885e3c0f2e18d99592f0a8baec747f8734da18032b2af9dc
|
|
BLAKE2b-256 checksum How to use checksums |
d9dad51c858731ba5242ba38bc94c58f7181d9e83092db7df3e04463479b1bd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp310-cp310-win_amd64.whl
| Download URL | pyd2lang_native-0.1.9-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 14.5 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d382b8f90c5b200f7aa97de8dc61509aec431259fc0980473457d58ce6480b3f
|
|
BLAKE2b-256 checksum How to use checksums |
2254cb6fff457e0527cd14899dad28c4f0875a13324f6e090390d54814e60003
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pyd2lang_native-0.1.9-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 13.7 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
74eded2f1ede8a8bdbabca1f1ec803a8f395a21469f915e4293641d6d9e44e30
|
|
BLAKE2b-256 checksum How to use checksums |
8cb71b3ba4a420d1ba8e519cd4fae7084ee94449115fb93c40d592adcee0d43f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | pyd2lang_native-0.1.9-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 14.6 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
9ab435ff3cfd87ce8755fbfde26901c140013f1af01674acc95a663c6e942f7b
|
|
BLAKE2b-256 checksum How to use checksums |
9923c92aa201001c01b7949b723911a6d8009f27a255b12281e3a63e779c7fd8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyd2lang_native-0.1.9-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | pyd2lang_native-0.1.9-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.7 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
907d2d4561649bc077779f8a435f4b044a3fa19a5d0733e2c4dcda72e9efd6bf
|
|
BLAKE2b-256 checksum How to use checksums |
c310988bd8862980bca336d766ac8d5a67dccc067e885d025d16e6261845fc78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|