Skip to main content

Experimental markup language for creating rich dashboards using Dash

Project description

dashlang

pipeline status coverage report

An experimental markup language for creating rich dashboards using Dash and Dash components.

Introduction

Dashlang is a project that offers developers a set of tools to easily create complex layouts of Dash components, using a syntax as close as possible to regular HTML. Its most simple usage allows developers to create layouts using the dashlang declarative markup format and convert the markup into a Python tree of Dash components in a simple and efficient way.

Example

Take the following snippet written in the dashlang markup format. The format tries to stay as close to HTML as possible, by using tags delimited by the < and > characters, and using opening and closing tags to declare elements.

<Div id="root-container" className="fluid-container">
  <H1 id="title" className="text-bold">This is a title</H1>
  <P>This is a simple paragraph with a very very long text</P>
</Div>

This snippet can be easily converted to a Python component tree just by calling a function

from dash import Dash
from dashlang.parsers import MarkupParser

parser = MarkupParser()

app = Dash(__name__)

with open("snippet.dml") as fp:
    app.layout = parser.parse(fp.read()).to_layout()

if __name__ == "__main__":
    app.run_server(debug=True)

Running the previous Python snippet will create a Dash application instance and load its layout from the snippet file containing the layout in markup format.

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

dashlang-0.0.1.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dashlang-0.0.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file dashlang-0.0.1.tar.gz.

File metadata

  • Download URL: dashlang-0.0.1.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for dashlang-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e239405874db73d01824ac29bdfc44296be50c16e98d05368dc711844e0b264e
MD5 18a156ee0844444fbedaaf9c44494e63
BLAKE2b-256 ba4206f3f45fbd8caea1dce92907341c50cbbd03a2adb3a617ccb560c567887d

See more details on using hashes here.

File details

Details for the file dashlang-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: dashlang-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for dashlang-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 794b134626a79e7b5d1a6ea3aeccc45416299b3ee79d356a06c686358693ba58
MD5 a1762c7ebc44338531ee8f04d3353557
BLAKE2b-256 4036caacac8a0b0026c1dda37e6c82de4f27305da03dfdc76f9b58a44932c751

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page