notecharts 0.1.0__tar.gz

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,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Danish Munib
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,8 @@
1
+ notecharts
2
+ Copyright 2026 Danish Munib
3
+
4
+ This product includes software developed at
5
+ The Apache Software Foundation (https://www.apache.org/).
6
+
7
+ Apache ECharts
8
+ Copyright 2017-2026 The Apache Software Foundation
@@ -0,0 +1,108 @@
1
+ Metadata-Version: 2.4
2
+ Name: notecharts
3
+ Version: 0.1.0
4
+ Summary: Beautiful, interactive charts in notebooks with Apache ECharts' powerful declarative API
5
+ Author-email: Danish Munib <danishmunibcontact@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/dmunish/notecharts
8
+ Project-URL: Repository, https://github.com/dmunish/notecharts.git
9
+ Project-URL: Issues, https://github.com/dmunish/notecharts/issues
10
+ Keywords: echarts,jupyter,visualization,charts,notebook
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Framework :: Jupyter
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Scientific/Engineering :: Visualization
16
+ Requires-Python: >=3.8
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ License-File: NOTICE
20
+ Requires-Dist: IPython
21
+ Dynamic: license-file
22
+
23
+ # notecharts
24
+
25
+ [![PyPI version](https://img.shields.io/pypi/v/notecharts.svg?style=flat-square)](https://pypi.org/project/notecharts/)
26
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
27
+ [![Python Versions](https://img.shields.io/pypi/pyversions/notecharts.svg?style=flat-square)](https://pypi.org/project/notecharts/)
28
+
29
+ **notecharts** is an ultra-lightweight, zero-config wrapper for Apache ECharts in Jupyter environments. It brings the full power of ECharts' declarative JSON-like API directly into Python notebooks without the bloat.
30
+
31
+ ## Why notecharts?
32
+
33
+ If you've used ECharts in Python before, you likely encountered two extremes:
34
+ - **pyecharts:** Powerful, but wraps the API in a deep "Pythonic" abstraction that often deviates from the official ECharts documentation, making it hard to translate JS examples to Python.
35
+ - **ipecharts:** Often lacks the interactivity or ease of use, API is buggy or unclear sometimes.
36
+
37
+ **notecharts** bridges this gap. It provides a thin layer that allows you to write ECharts options exactly as they appear in the official docs, while handling the heavy lifting of library loading, font injection, and serialization.
38
+
39
+ ## Key Features
40
+
41
+ - **Declarative API:** Pass a dictionary, get a chart. No complex class hierarchies to learn.
42
+ - **`JSCode` Support:** Inject raw JavaScript functions for formatters, tooltips, and custom logic.
43
+ - **Smart Font Discovery:** Automatically detect `fontFamily` declarations in your options fetch the corresponding fonts (if available) from Google Fonts.
44
+ - **Pre-built Modern Charts:** Includes high-level classes like `Bar`, `Line`, `Scatter`, `Donut`, and `Radar` with beautiful default harmonies.
45
+ - **Environment Agnostic:** Works seamlessly in VS Code, JupyterLab, and Google Colab.
46
+
47
+ ## Installation
48
+
49
+ ```bash
50
+ pip install notecharts
51
+ ```
52
+
53
+ ## Usage
54
+
55
+ ### The Declarative Way (Total Control)
56
+ If you can find an example on the [ECharts Gallery](https://echarts.apache.org/examples/en/index.html), you can run it in `notecharts`.
57
+
58
+ ```python
59
+ from notecharts import Chart, JSCode
60
+
61
+ options = {
62
+ "title": {"text": "Basic Chart"},
63
+ "xAxis": {"data": ["Mon", "Tue", "Wed", "Thu", "Fri"]},
64
+ "yAxis": {},
65
+ "series": [{
66
+ "type": "bar",
67
+ "data": [23, 24, 18, 25, 27], # or any other object/variable
68
+ "label": {
69
+ "show": True,
70
+ "formatter": JSCode("function(p) { return p.value + ' units'; }")
71
+ }
72
+ }],
73
+ "textStyle": {
74
+ "fontFamily": "Inter" # Automatically loaded from Google Fonts!
75
+ }
76
+ }
77
+
78
+ Chart(options).display()
79
+ ```
80
+
81
+ ### The Quick Way (Pre-built Charts)
82
+ Use the pre-configured classes for common visualizations with aesthetic defaults.
83
+
84
+ ```python
85
+ import pandas as pd
86
+ from notecharts import Bar
87
+
88
+ df = pd.DataFrame({ # or a list-of-lists, list-of-dicts format
89
+ "Day": ["Mon", "Tue", "Wed"],
90
+ "Sales": [150, 230, 224]
91
+ })
92
+
93
+ Bar(df, x="Day", y="Sales", title="Weekly Sales", theme="dark").display()
94
+ ```
95
+
96
+ ## Important Considerations
97
+
98
+ - **Security:** Use of `JSCode` allows for arbitrary JavaScript execution in the browser/notebook context. Always ensure you are passing trusted code and data to your charts.
99
+ - **Connectivity:** This library is ultra-lightweight because it does not ship with the ECharts binaries. It fetches them from `cdn.jsdelivr.net` at runtime, so an active internet connection is required to render charts.
100
+
101
+ ## License & Attribution
102
+
103
+ - **notecharts** is licensed under the [MIT License](LICENSE).
104
+ - **Apache ECharts**: This library is a wrapper for [Apache ECharts](https://echarts.apache.org/en/index.html) (incubating), which is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
105
+ - *Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.*
106
+
107
+ ## References
108
+ See the [ECharts gallery](https://echarts.apache.org/examples/en/index.html) for bespoke examples, or the [official docs](https://echarts.apache.org/en/option.html) for an in-depth exaplanation of the options available.
@@ -0,0 +1,86 @@
1
+ # notecharts
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/notecharts.svg?style=flat-square)](https://pypi.org/project/notecharts/)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
5
+ [![Python Versions](https://img.shields.io/pypi/pyversions/notecharts.svg?style=flat-square)](https://pypi.org/project/notecharts/)
6
+
7
+ **notecharts** is an ultra-lightweight, zero-config wrapper for Apache ECharts in Jupyter environments. It brings the full power of ECharts' declarative JSON-like API directly into Python notebooks without the bloat.
8
+
9
+ ## Why notecharts?
10
+
11
+ If you've used ECharts in Python before, you likely encountered two extremes:
12
+ - **pyecharts:** Powerful, but wraps the API in a deep "Pythonic" abstraction that often deviates from the official ECharts documentation, making it hard to translate JS examples to Python.
13
+ - **ipecharts:** Often lacks the interactivity or ease of use, API is buggy or unclear sometimes.
14
+
15
+ **notecharts** bridges this gap. It provides a thin layer that allows you to write ECharts options exactly as they appear in the official docs, while handling the heavy lifting of library loading, font injection, and serialization.
16
+
17
+ ## Key Features
18
+
19
+ - **Declarative API:** Pass a dictionary, get a chart. No complex class hierarchies to learn.
20
+ - **`JSCode` Support:** Inject raw JavaScript functions for formatters, tooltips, and custom logic.
21
+ - **Smart Font Discovery:** Automatically detect `fontFamily` declarations in your options fetch the corresponding fonts (if available) from Google Fonts.
22
+ - **Pre-built Modern Charts:** Includes high-level classes like `Bar`, `Line`, `Scatter`, `Donut`, and `Radar` with beautiful default harmonies.
23
+ - **Environment Agnostic:** Works seamlessly in VS Code, JupyterLab, and Google Colab.
24
+
25
+ ## Installation
26
+
27
+ ```bash
28
+ pip install notecharts
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ ### The Declarative Way (Total Control)
34
+ If you can find an example on the [ECharts Gallery](https://echarts.apache.org/examples/en/index.html), you can run it in `notecharts`.
35
+
36
+ ```python
37
+ from notecharts import Chart, JSCode
38
+
39
+ options = {
40
+ "title": {"text": "Basic Chart"},
41
+ "xAxis": {"data": ["Mon", "Tue", "Wed", "Thu", "Fri"]},
42
+ "yAxis": {},
43
+ "series": [{
44
+ "type": "bar",
45
+ "data": [23, 24, 18, 25, 27], # or any other object/variable
46
+ "label": {
47
+ "show": True,
48
+ "formatter": JSCode("function(p) { return p.value + ' units'; }")
49
+ }
50
+ }],
51
+ "textStyle": {
52
+ "fontFamily": "Inter" # Automatically loaded from Google Fonts!
53
+ }
54
+ }
55
+
56
+ Chart(options).display()
57
+ ```
58
+
59
+ ### The Quick Way (Pre-built Charts)
60
+ Use the pre-configured classes for common visualizations with aesthetic defaults.
61
+
62
+ ```python
63
+ import pandas as pd
64
+ from notecharts import Bar
65
+
66
+ df = pd.DataFrame({ # or a list-of-lists, list-of-dicts format
67
+ "Day": ["Mon", "Tue", "Wed"],
68
+ "Sales": [150, 230, 224]
69
+ })
70
+
71
+ Bar(df, x="Day", y="Sales", title="Weekly Sales", theme="dark").display()
72
+ ```
73
+
74
+ ## Important Considerations
75
+
76
+ - **Security:** Use of `JSCode` allows for arbitrary JavaScript execution in the browser/notebook context. Always ensure you are passing trusted code and data to your charts.
77
+ - **Connectivity:** This library is ultra-lightweight because it does not ship with the ECharts binaries. It fetches them from `cdn.jsdelivr.net` at runtime, so an active internet connection is required to render charts.
78
+
79
+ ## License & Attribution
80
+
81
+ - **notecharts** is licensed under the [MIT License](LICENSE).
82
+ - **Apache ECharts**: This library is a wrapper for [Apache ECharts](https://echarts.apache.org/en/index.html) (incubating), which is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
83
+ - *Apache ECharts, ECharts, Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the Apache Software Foundation.*
84
+
85
+ ## References
86
+ See the [ECharts gallery](https://echarts.apache.org/examples/en/index.html) for bespoke examples, or the [official docs](https://echarts.apache.org/en/option.html) for an in-depth exaplanation of the options available.
@@ -0,0 +1,5 @@
1
+ from .widget import Chart, JSCode
2
+ from .charts import Bar, Line, Scatter, Donut, Radar
3
+
4
+ __version__ = "0.1.0"
5
+ __all__ = ["Chart", "JSCode", "Bar", "Line", "Scatter", "Donut", "Radar"]