Metadata-Version: 2.4
Name: finterion-charts
Version: 1.0.0
Summary: Python binding for Finterion Charts — declarative ChartSpec builder, validator, and codec.
Project-URL: Homepage, https://github.com/Finterion/charts
Project-URL: Issues, https://github.com/Finterion/charts/issues
Project-URL: Source, https://github.com/Finterion/charts/tree/main/bindings/python
Author: Finterion
License: Finterion Community License 1.0 (source-available, not OSI-approved). See LICENSE file.
License-File: LICENSE
Keywords: candlestick,chart,charts,finance,finterion,ohlc,trading
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.10
Provides-Extra: all
Requires-Dist: ipython>=8.0; extra == 'all'
Requires-Dist: jsonschema>=4.17; extra == 'all'
Requires-Dist: numpy>=1.24; extra == 'all'
Requires-Dist: pandas>=2.0; extra == 'all'
Provides-Extra: dev
Requires-Dist: jsonschema>=4.17; extra == 'dev'
Requires-Dist: numpy>=1.24; extra == 'dev'
Requires-Dist: pandas>=2.0; extra == 'dev'
Requires-Dist: pytest>=7.4; extra == 'dev'
Provides-Extra: jupyter
Requires-Dist: ipython>=8.0; extra == 'jupyter'
Provides-Extra: pandas
Requires-Dist: numpy>=1.24; extra == 'pandas'
Requires-Dist: pandas>=2.0; extra == 'pandas'
Provides-Extra: schema
Requires-Dist: jsonschema>=4.17; extra == 'schema'
Description-Content-Type: text/markdown

# finterion-charts (Python)

Python binding for [Finterion Charts](https://github.com/Finterion/charts).

This package does **not render** anything. It builds, validates, and encodes
`ChartSpec` JSON — the same JSON contract consumed by `@finterion/charts-spec`.
Rendering is done in the browser by `@finterion/charts-core`, so charts produced
from Python are pixel-identical to charts produced from TypeScript.

## Install

From PyPI (once published):

```bash
pip install finterion-charts          # core: builder + cheap validator + codec
pip install "finterion-charts[schema]"   # add jsonschema-based strict validation
pip install "finterion-charts[pandas]"   # add pandas/numpy ergonomic builders
pip install "finterion-charts[jupyter]"  # add IPython iframe display helper
pip install "finterion-charts[all]"
```

From this monorepo (editable):

```bash
cd bindings/python
pip install -e ".[all,dev]"
```

## Quickstart

```python
from finterion_charts import ChartSpec, Indicator, Price, Marker

spec = (
    ChartSpec(theme="finterion-dark", background="#131722", grid="horizontal")
    .with_bars(time=time, open=o, high=h, low=l, close=c, volume=v)
    .with_column("rsi14", rsi)
    .add_panel(Price(id="price", weight=3, title="AAPL", type="candles"))
    .add_panel(Indicator.panel(
        id="rsi", weight=1, title="RSI 14",
        values="rsi14", color="#a3ff12",
        ref_lines=[30, 70], y_range=(0, 100),
    ))
    .add_marker(Marker(time=ts, side="buy",  price=lo, label="B"))
    .add_marker(Marker(time=ts, side="sell", price=hi, label="S"))
)

spec.validate()                   # raises ValueError on invalid spec
spec.to_json("chart.json")
url = spec.embed_url()            # https://charts.finterion.com/embed/#spec=…
```

See [`examples/aapl_supertrend.py`](examples/aapl_supertrend.py) for an end-to-end
example with OHLC, RSI, SuperTrend overlay, and buy/sell markers.

## Licence

**Finterion Community Licence v1.0** (source-available, not OSI-approved).
Free to use — including commercially — as long as the default "Powered by
Finterion" badge stays visible on rendered charts. To remove the badge or to
build a competing hosted charting service, you need a commercial licence:
contact licensing@finterion.com. See the `LICENSE` file shipped with the
wheel, or the [full text on GitHub](https://github.com/Finterion/charts/blob/main/LICENSE).
