Build your Dash layouts with HTML snippets
This package allows you to craft your Dash application layouts by writing HTML instead of a cascade of Python objects.
Installation
You can install the package with pip:
pip install dash-htmlayout
Documentation
Read documentation to learn more
Introduction
It's a bit counterproductive to force users to build dashboard layouts using Python, when most component classes are translated into HTML.
Having to write code with deeply nested object instances to mimic HTML should almost be considered malpractice in Python when there is a language and a document type that addresses this exact need; HTML.
This package provides a simple class to generate layouts from a partial HTML snippet. For example, we could partially reproduce a classic layout with the following document:
<!-- Example with Bootstrap classes and some components -->
<section>
<h1 class="mb-5">Dashboard component.</h1>
<div class="row">
<div class="col-3">
<div class="form-group mb-3">
<label for="">Genres filter</label>
<dcc-dropdown id="genre-list" placeholder="Filter genres" data-multi="True"/>
</div>
<div class="form-group mb-3">
<label for="">Max results</label>
<dcc-slider id="genre-limit" data-value="1" data-min="0" data-max="10"/>
</div>
</div>
...
</div>
</section>
In Python
from dash import Dash
from dash.htmlayout import Builder
application = Dash("appname")
builder = Builder(file="myfile.html")
application.layout = builder.layout
...
Metadata
Release files for dash-htmlayout 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dash_htmlayout-1.0.5.tar.gz | 6.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dash_htmlayout-1.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.5 kB
Release files / dash_htmlayout-1.0.5.tar.gz
| Download URL | dash_htmlayout-1.0.5.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2023abadf45670b9b21be25265af85867cae2a6e4e6bf4a79cdced1d9f226af1
|
|
BLAKE2b-256 checksum How to use checksums |
a6e4ba4216d07b376f5b9c3f4a69452b21695327da8e9b0b247f5998aa2e28c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / dash_htmlayout-1.0.5-py3-none-any.whl
| Download URL | dash_htmlayout-1.0.5-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
318706703d9262fa296b3f6a74e1f4d3e1b7ffd2e2d5b371a6971add9727ca73
|
|
BLAKE2b-256 checksum How to use checksums |
8d5975703003e134b68e952cf50c2aeb46073bb1de26a4e55cf951f25ee2e705
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|