Skip to main content

klinepy

Python wrapper for KLineCharts (klinecharts@10) — one chart spec, three outputs: standalone HTML, embeddable fragment, marimo/anywidget widget.

Grayscale theme with a single amber accent (#d97706). The JS side loads the klinecharts ESM build from jsDelivr (needs internet in the browser); the Python side is pure data (polars/pandas frames or dicts — no data deps).

Usage

from klinepy import KLineChart, html, fragment

chart = KLineChart(
    bars,                      # polars/pandas DataFrame or list of dicts
    lines={"SMA 20": sma},     # optional overlay values, aligned/padded to bar count
    title="AAPL",
    indicators=[{"name": "MACD"}],  # optional built-in klinecharts indicators
    height=460,
)

# 1. marimo / Jupyter widget
mo.ui.anywidget(chart)

# 2. standalone HTML document (CDN ESM, no build step)
open("aapl.html", "w").write(chart.to_html())   # or: html(chart)

# 3. embeddable fragment for web apps (no <html> wrapper)
page += chart.fragment()                        # or: fragment(chart)

Development

uv sync
uv run pytest

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

klinepy-0.1.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

klinepy-0.1.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file klinepy-0.1.0.tar.gz.

File metadata

  • Download URL: klinepy-0.1.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for klinepy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 53931d805fa217a032d8cc236eac29d4c4f15faef4ae1029448462722df186b1
MD5 238c15f0aefd275396b4058ebaf0cddf
BLAKE2b-256 3f5a44e9c6c5330876f2132a9be03aac0a3fe8ee4410ad7105196510a6aaf593

See more details on using hashes here.

File details

Details for the file klinepy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: klinepy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for klinepy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6a9509073005dd7bf1f04aa77ef85e6523df3f341830aed47e38a3afe736ace
MD5 a91c0ed8a6a0ce1949f7217b77c51a74
BLAKE2b-256 e8f068a1a7eaa9732f9e4229d04bc1fd11e94af4f58a8affb966d534380190cd

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.0

2 files

0.2.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page