finterion-charts 0.2.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,13 @@
1
+ node_modules/
2
+ dist/
3
+ .turbo/
4
+ .DS_Store
5
+ *.log
6
+ .vite/
7
+
8
+ # Python (sample data scripts use a venv locally)
9
+ .venv*/
10
+ __pycache__/
11
+ *.pyc
12
+
13
+ /design/*
@@ -0,0 +1,92 @@
1
+ Metadata-Version: 2.4
2
+ Name: finterion-charts
3
+ Version: 0.2.0
4
+ Summary: Python binding for Finterion Charts — declarative ChartSpec builder, validator, and codec.
5
+ Project-URL: Homepage, https://github.com/Finterion/charts
6
+ Project-URL: Issues, https://github.com/Finterion/charts/issues
7
+ Project-URL: Source, https://github.com/Finterion/charts/tree/main/bindings/python
8
+ Author: Finterion
9
+ License: MIT
10
+ Keywords: candlestick,chart,charts,finance,finterion,ohlc,trading
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Office/Business :: Financial :: Investment
18
+ Classifier: Topic :: Scientific/Engineering :: Visualization
19
+ Requires-Python: >=3.10
20
+ Provides-Extra: all
21
+ Requires-Dist: ipython>=8.0; extra == 'all'
22
+ Requires-Dist: jsonschema>=4.17; extra == 'all'
23
+ Requires-Dist: numpy>=1.24; extra == 'all'
24
+ Requires-Dist: pandas>=2.0; extra == 'all'
25
+ Provides-Extra: dev
26
+ Requires-Dist: jsonschema>=4.17; extra == 'dev'
27
+ Requires-Dist: numpy>=1.24; extra == 'dev'
28
+ Requires-Dist: pandas>=2.0; extra == 'dev'
29
+ Requires-Dist: pytest>=7.4; extra == 'dev'
30
+ Provides-Extra: jupyter
31
+ Requires-Dist: ipython>=8.0; extra == 'jupyter'
32
+ Provides-Extra: pandas
33
+ Requires-Dist: numpy>=1.24; extra == 'pandas'
34
+ Requires-Dist: pandas>=2.0; extra == 'pandas'
35
+ Provides-Extra: schema
36
+ Requires-Dist: jsonschema>=4.17; extra == 'schema'
37
+ Description-Content-Type: text/markdown
38
+
39
+ # finterion-charts (Python)
40
+
41
+ Python binding for [Finterion Charts](https://github.com/Finterion/charts).
42
+
43
+ This package does **not render** anything. It builds, validates, and encodes
44
+ `ChartSpec` JSON — the same JSON contract consumed by `@finterion/charts-spec`.
45
+ Rendering is done in the browser by `@finterion/charts-core`, so charts produced
46
+ from Python are pixel-identical to charts produced from TypeScript.
47
+
48
+ ## Install
49
+
50
+ From PyPI (once published):
51
+
52
+ ```bash
53
+ pip install finterion-charts # core: builder + cheap validator + codec
54
+ pip install "finterion-charts[schema]" # add jsonschema-based strict validation
55
+ pip install "finterion-charts[pandas]" # add pandas/numpy ergonomic builders
56
+ pip install "finterion-charts[jupyter]" # add IPython iframe display helper
57
+ pip install "finterion-charts[all]"
58
+ ```
59
+
60
+ From this monorepo (editable):
61
+
62
+ ```bash
63
+ cd bindings/python
64
+ pip install -e ".[all,dev]"
65
+ ```
66
+
67
+ ## Quickstart
68
+
69
+ ```python
70
+ from finterion_charts import ChartSpec, Indicator, Price, Marker
71
+
72
+ spec = (
73
+ ChartSpec(theme="finterion-dark", background="#131722", grid="horizontal")
74
+ .with_bars(time=time, open=o, high=h, low=l, close=c, volume=v)
75
+ .with_column("rsi14", rsi)
76
+ .add_panel(Price(id="price", weight=3, title="AAPL", type="candles"))
77
+ .add_panel(Indicator.panel(
78
+ id="rsi", weight=1, title="RSI 14",
79
+ values="rsi14", color="#a3ff12",
80
+ ref_lines=[30, 70], y_range=(0, 100),
81
+ ))
82
+ .add_marker(Marker(time=ts, side="buy", price=lo, label="B"))
83
+ .add_marker(Marker(time=ts, side="sell", price=hi, label="S"))
84
+ )
85
+
86
+ spec.validate() # raises ValueError on invalid spec
87
+ spec.to_json("chart.json")
88
+ url = spec.embed_url() # https://charts.finterion.com/embed/#spec=…
89
+ ```
90
+
91
+ See [`examples/aapl_supertrend.py`](examples/aapl_supertrend.py) for an end-to-end
92
+ example with OHLC, RSI, SuperTrend overlay, and buy/sell markers.
@@ -0,0 +1,54 @@
1
+ # finterion-charts (Python)
2
+
3
+ Python binding for [Finterion Charts](https://github.com/Finterion/charts).
4
+
5
+ This package does **not render** anything. It builds, validates, and encodes
6
+ `ChartSpec` JSON — the same JSON contract consumed by `@finterion/charts-spec`.
7
+ Rendering is done in the browser by `@finterion/charts-core`, so charts produced
8
+ from Python are pixel-identical to charts produced from TypeScript.
9
+
10
+ ## Install
11
+
12
+ From PyPI (once published):
13
+
14
+ ```bash
15
+ pip install finterion-charts # core: builder + cheap validator + codec
16
+ pip install "finterion-charts[schema]" # add jsonschema-based strict validation
17
+ pip install "finterion-charts[pandas]" # add pandas/numpy ergonomic builders
18
+ pip install "finterion-charts[jupyter]" # add IPython iframe display helper
19
+ pip install "finterion-charts[all]"
20
+ ```
21
+
22
+ From this monorepo (editable):
23
+
24
+ ```bash
25
+ cd bindings/python
26
+ pip install -e ".[all,dev]"
27
+ ```
28
+
29
+ ## Quickstart
30
+
31
+ ```python
32
+ from finterion_charts import ChartSpec, Indicator, Price, Marker
33
+
34
+ spec = (
35
+ ChartSpec(theme="finterion-dark", background="#131722", grid="horizontal")
36
+ .with_bars(time=time, open=o, high=h, low=l, close=c, volume=v)
37
+ .with_column("rsi14", rsi)
38
+ .add_panel(Price(id="price", weight=3, title="AAPL", type="candles"))
39
+ .add_panel(Indicator.panel(
40
+ id="rsi", weight=1, title="RSI 14",
41
+ values="rsi14", color="#a3ff12",
42
+ ref_lines=[30, 70], y_range=(0, 100),
43
+ ))
44
+ .add_marker(Marker(time=ts, side="buy", price=lo, label="B"))
45
+ .add_marker(Marker(time=ts, side="sell", price=hi, label="S"))
46
+ )
47
+
48
+ spec.validate() # raises ValueError on invalid spec
49
+ spec.to_json("chart.json")
50
+ url = spec.embed_url() # https://charts.finterion.com/embed/#spec=…
51
+ ```
52
+
53
+ See [`examples/aapl_supertrend.py`](examples/aapl_supertrend.py) for an end-to-end
54
+ example with OHLC, RSI, SuperTrend overlay, and buy/sell markers.
File without changes