Metadata-Version: 2.1
Name: dashlang
Version: 0.0.1
Summary: Experimental markup language for creating rich dashboards using Dash
Home-page: https://gitlab.com/runemaster/dashlang
Author: Pedro Dias
Author-email: pedrodias.miguel@gmail.com
Maintainer: Pedro Dias
Maintainer-email: pedrodias.miguel@gmail.com
License: Unlicense
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Dash
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

# dashlang

 [![pipeline status](https://gitlab.com/runemaster/dashlang/badges/main/pipeline.svg)](https://gitlab.com/runemaster/dashlang/-/commits/main) 
[![coverage report](https://gitlab.com/runemaster/dashlang/badges/main/coverage.svg)](https://gitlab.com/runemaster/dashlang/-/commits/main) 

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.


