dashml-lang 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,140 @@
1
+ Metadata-Version: 2.4
2
+ Name: dashml-lang
3
+ Version: 0.1.0
4
+ Summary: Declarative YAML-based compiler for data visualization dashboards. Write your dashboard once, compile to Streamlit, Plotly, Observable Plot, Apache Superset, Vega-Lite, or Grafana.
5
+ Author: Dawid Olejniczak, Szymon Nowaczyk
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/dashml-dev/dashml
8
+ Project-URL: Repository, https://github.com/dashml-dev/dashml
9
+ Project-URL: Issues, https://github.com/dashml-dev/dashml/issues
10
+ Keywords: dashboard,visualization,dsl,declarative,compiler,yaml,streamlit,plotly,observable-plot,vega-lite,grafana,superset,bigquery,business-intelligence
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Information Technology
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Scientific/Engineering :: Visualization
22
+ Classifier: Topic :: Software Development :: Code Generators
23
+ Classifier: Topic :: Software Development :: Compilers
24
+ Requires-Python: >=3.9
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: pyyaml>=6.0
28
+ Provides-Extra: streamlit
29
+ Requires-Dist: streamlit>=1.40.0; extra == "streamlit"
30
+ Requires-Dist: pandas>=2.0.0; extra == "streamlit"
31
+ Requires-Dist: altair>=5.0.0; extra == "streamlit"
32
+ Requires-Dist: watchdog>=4.0.0; extra == "streamlit"
33
+ Provides-Extra: sql
34
+ Requires-Dist: flask>=3.0.0; extra == "sql"
35
+ Requires-Dist: sqlalchemy>=2.0.0; extra == "sql"
36
+ Requires-Dist: psycopg2-binary>=2.9.0; extra == "sql"
37
+ Provides-Extra: bigquery
38
+ Requires-Dist: flask>=3.0.0; extra == "bigquery"
39
+ Requires-Dist: google-cloud-bigquery>=3.0.0; extra == "bigquery"
40
+ Provides-Extra: superset
41
+ Requires-Dist: requests>=2.32.0; extra == "superset"
42
+ Provides-Extra: dev
43
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
44
+ Requires-Dist: build>=1.0.0; extra == "dev"
45
+ Dynamic: license-file
46
+
47
+ # DashML
48
+
49
+ A declarative language for data visualization dashboards that compiles to multiple platforms.
50
+
51
+ Write your dashboard spec once in `.dashml` format, then compile it to **Streamlit**, **Plotly**, **Observable Plot**, **Apache Superset**, **Vega-Lite**, or **Grafana**.
52
+
53
+ ## Quick Start
54
+
55
+ ```bash
56
+ # Generate a Streamlit app
57
+ python -m dashml_new.cli build dashboard.dashml --target streamlit --output app_dir
58
+ streamlit run app_dir/app.py
59
+
60
+ # Generate a standalone Plotly HTML dashboard
61
+ python -m dashml_new.cli build dashboard.dashml --target plotly --output dashboard.html
62
+
63
+ # Generate an Observable Plot HTML dashboard
64
+ python -m dashml_new.cli build dashboard.dashml --target observable --output dashboard.html
65
+
66
+ # Generate a Vega-Lite JSON specification
67
+ python -m dashml_new.cli build dashboard.dashml --target vegalite --output dashboard.json
68
+
69
+ # Generate a Grafana dashboard JSON
70
+ python -m dashml_new.cli build dashboard.dashml --target grafana --output dashboard.json
71
+
72
+ # Create a dashboard directly in Apache Superset
73
+ python -m dashml_new.cli build dashboard.dashml --target superset \
74
+ --superset-user admin --superset-password admin
75
+ ```
76
+
77
+ ## Database credentials
78
+
79
+ For SQL or BigQuery data sources, the generated artifact reads connection
80
+ parameters from environment variables at runtime — never from baked-in literals.
81
+ The generator emits `.env.example`, `.gitignore`, and `SECRETS.md` next to the
82
+ generated `app.py`. Copy `.env.example` to `.env`, fill in the values, and run.
83
+ The same artifact directory is safe to commit to a public repository.
84
+
85
+ ```bash
86
+ python -m dashml_new.cli build dashboard.dashml --target plotly --output app_dir
87
+ cd app_dir
88
+ cp .env.example .env # edit .env, set DASHML_DB_PASSWORD etc.
89
+ python app.py # reads from env (or .env via python-dotenv)
90
+ ```
91
+
92
+ See `SECRETS.md` in any generated SQL/BigQuery artifact for the full list of
93
+ environment variables and recommended deployment patterns (Docker, Kubernetes,
94
+ systemd, CI/CD, GCP Workload Identity).
95
+
96
+ ## Example
97
+
98
+ ```yaml
99
+ version: 0.1
100
+ title: "Sales Dashboard"
101
+ style: "styles/dracula.dmls"
102
+
103
+ data:
104
+ type: csv
105
+ path: "data/sales.csv"
106
+
107
+ charts:
108
+ - id: "sales_by_country"
109
+ type: "bar"
110
+ title: "Sales by Country"
111
+ x: "country"
112
+ y: "sales"
113
+ agg: "sum"
114
+ sort: "y"
115
+ sort_order: "desc"
116
+ limit: 10
117
+ ```
118
+
119
+ ## Documentation
120
+
121
+ - **[User Guide](dashml_new/README.md)** - Full specification reference, chart types, CLI, themes
122
+ - **[Architecture](ARCHITECTURE.md)** - System design, compiler pipeline, type system
123
+
124
+ ## Key Concepts
125
+
126
+ - **Compiler, not runtime** - DashML generates standalone code; it never loads or touches your data
127
+ - **Credentials never baked** - generated SQL/BigQuery artifacts read database credentials from environment variables at runtime; safe to version-control
128
+ - **12 chart types** - bar, line, scatter, pie, area, histogram, stacked_bar, grouped_bar, bubble, heatmap, box, geo
129
+ - **3 data sources** - CSV, SQL (PostgreSQL/MySQL/SQLite), Google BigQuery
130
+ - **6 backends** - Streamlit, Plotly, Observable Plot, Apache Superset, Vega-Lite, Grafana
131
+ - **6 built-in themes** - Dracula, Nord, Gruvbox, Monokai, One Dark, Solarized Light
132
+
133
+ ## Authors
134
+
135
+ - Dawid Olejniczak
136
+ - Szymon Nowaczyk
137
+
138
+ ## License
139
+
140
+ MIT
@@ -0,0 +1,30 @@
1
+ dashml_lang-0.1.0.dist-info/licenses/LICENSE,sha256=6Y50bnWjXSZp7ja2nkrUF2HMx2sWnQdHz_DcgYLRIkY,1090
2
+ dashml_new/__init__.py,sha256=sVTHPGsGYrnmXvfbElp-DdM5CVQ_oEOritfX8GA2Do0,400
3
+ dashml_new/app.py,sha256=2DQBUvFCCINElDtFxR22tHTVaG-XknGhVxt33YHctD8,1065
4
+ dashml_new/cli.py,sha256=FegRzTDajp2JroLcFIyaM_3HfZSamYG3AU4FCxiHYKE,25368
5
+ dashml_new/generate_startup_data.py,sha256=17rurUYYpdcebYI3Ei0OU4Ll344JcqIWMuh4HnxjtCo,4223
6
+ dashml_new/get_chart.py,sha256=EcYjrQ70dSxogucR0oTTIsSJf7TQYqzd9i3Az26yiFg,1261
7
+ dashml_new/inspect_dashboard.py,sha256=Ko5gA8urmEuA5p2Xp2cpjfBkpskygKsGk-r6-Z6fkrM,3769
8
+ dashml_new/core/__init__.py,sha256=rKxOMzE8l-ujH-VI7p9YfG0S1Jzd5pjW6EF-7HwtZ24,587
9
+ dashml_new/core/engine.py,sha256=K3m0si2hZOYb-Pme_xxYY-53APCX1uLLB8VDhSfBprc,1550
10
+ dashml_new/core/normalizer.py,sha256=9OZ3G9kR8hafmS4aty0ccqJ_ApXSqAs75SHskPyPkqI,17267
11
+ dashml_new/core/parser.py,sha256=OJFGr4cCSpluoGGoxozX6x-5UNk3AZKVKVDpAAUOKsc,1170
12
+ dashml_new/core/types.py,sha256=YRF_UTwE3kspaK2M1ZELFSnpwRSWw8PLNL_SbbK0I-0,10630
13
+ dashml_new/core/validator.py,sha256=9ULTTu2MGU90MrpQUZPtaBhzP0zCzcieYjmzjaEWcgo,22298
14
+ dashml_new/core/watcher.py,sha256=vl04Sgo0bkHlN7eOtDNjUn_yOHxcQOAC1e6Z9Q0IQxk,2954
15
+ dashml_new/transformers/__init__.py,sha256=vVbcRfSMS8tICO8im21zGhXAZ6_IMzTLJyOncvihU4s,230
16
+ dashml_new/transformers/base.py,sha256=P5t8k3K7N_soh7NZvPo_5_in7zji1hX3q4Evc8bxTc0,3384
17
+ dashml_new/transformers/constants.py,sha256=ZAfQuf0RRChAUfUXpcKSdGdJGXZeANLF2jvC4spzW1o,17197
18
+ dashml_new/transformers/grafana.py,sha256=LQG-xiTqQ2lPS9OEyj4WsXtov41TZGREoniWevPOIdM,45938
19
+ dashml_new/transformers/observable.py,sha256=Fw-93fu38qvpEe1mDglTKKblB-AVgQt2gev3A8QxIRM,114524
20
+ dashml_new/transformers/plotly.py,sha256=IjlL3IOQDQGoUlnaiz_fkmUL6aJeJVbRET6hWNBBxyQ,113775
21
+ dashml_new/transformers/registry.py,sha256=-xyYPVO4cX-fx4KcouriKc5yS-xPzN2mFSRmwUERyvY,2919
22
+ dashml_new/transformers/secrets.py,sha256=k5qXPEZcbKzzbtz8Q8vpEP5Xwz8x_QnOHvWSzD-UIvU,9769
23
+ dashml_new/transformers/streamlit.py,sha256=vajUKiRL35gT2eq5m6Ps-UG6u-DSwKaTBq9Uv6W8tQo,57170
24
+ dashml_new/transformers/superset.py,sha256=x3enGztLjp95DVmYTpAbufkie3ze-5_rrpQqR_jivUU,76136
25
+ dashml_new/transformers/vegalite.py,sha256=a5H7lyZfBazJZEbPdNeVkn57LCRLc4amQIrDIONGixQ,38921
26
+ dashml_lang-0.1.0.dist-info/METADATA,sha256=AUSULkg5M_yJJucF9OpZUUkPGzg24tAGNPa6WvufcOg,5401
27
+ dashml_lang-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
28
+ dashml_lang-0.1.0.dist-info/entry_points.txt,sha256=dkIVlFgh4PWFEzaAWhNGcR4XZ1rm7MsdSesxXMwGN70,47
29
+ dashml_lang-0.1.0.dist-info/top_level.txt,sha256=6WB89MnO1IV87pBYc6NO0teYxR1ICD2Zha9jah0B7cE,11
30
+ dashml_lang-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ dashml = dashml_new.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dawid Olejniczak, Szymon Nowaczyk
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ dashml_new
dashml_new/__init__.py ADDED
@@ -0,0 +1,11 @@
1
+ """
2
+ DashML - Declarative Dashboard Language
3
+
4
+ A domain-specific language for building data visualization dashboards.
5
+ Write once in DashML, generate code for multiple platforms.
6
+ """
7
+ from .core import DashMLEngine, ValidationError
8
+ from .transformers import Transformer, TransformerRegistry
9
+
10
+ __version__ = "0.000000001"
11
+ __all__ = ["DashMLEngine", "ValidationError", "Transformer", "TransformerRegistry"]
dashml_new/app.py ADDED
@@ -0,0 +1,39 @@
1
+ import streamlit as st
2
+ import pandas as pd
3
+
4
+ def main():
5
+ st.set_page_config(
6
+ page_title="DashML Example Dashboard",
7
+ page_icon="📊",
8
+ layout="wide"
9
+ )
10
+ st.title("DashML Example Dashboard")
11
+
12
+ # Load data
13
+ try:
14
+ df = pd.read_csv("data/example.csv")
15
+ except FileNotFoundError:
16
+ st.error("Data file not found: data/example.csv")
17
+ return
18
+ except Exception as e:
19
+ st.error(f"Error loading data: {e}")
20
+ return
21
+
22
+ # Chart: sales_by_country
23
+ st.subheader("Sales by country")
24
+ # Aggregate: sum(sales) group by country
25
+ chart_data = df.groupby("country")["sales"].sum().reset_index()
26
+ chart_data = chart_data.set_index("country")["sales"]
27
+ st.bar_chart(chart_data)
28
+ st.divider()
29
+
30
+ # Chart: sales_over_time
31
+ st.subheader("Sales over time")
32
+ # Aggregate: sum(sales) group by date
33
+ chart_data = df.groupby("date")["sales"].sum().reset_index()
34
+ chart_data = chart_data.set_index("date")["sales"]
35
+ st.line_chart(chart_data)
36
+
37
+
38
+ if __name__ == "__main__":
39
+ main()