Skip to main content

High-performance terminal charting SDK — line, candlestick, bar, histogram, sparkline charts with technical indicators. Built in Rust, native Python bindings via PyO3.

Project description

TermiChart — Python SDK

High-performance terminal charting SDK built in Rust with native Python bindings. Render line charts, candlestick charts, bar charts, histograms, and sparklines directly in the terminal.

Screenshots

Line Chart

Line Chart

Candlestick Chart

Candlestick Chart

Bar Chart

Bar Chart

Sparkline

Sparkline

Installation

pip install termichart

Quick Start

Line Chart

import termichart

chart = termichart.PyChart("line")
chart.size(80, 20)
chart.set_title("Sensor Data")
for i in range(15):
    chart.add_point(float(i), 10.0 + i * 1.5 + (i % 3) * 2.0)
chart.show()

Candlestick Chart

import termichart

chart = termichart.PyChart("candlestick")
chart.size(80, 20)
chart.set_title("BTC/USDT")
chart.add_candle(0, 100.0, 110.0, 95.0, 105.0, 1000.0)
chart.add_candle(1, 105.0, 115.0, 100.0, 112.0, 1200.0)
chart.add_candle(2, 112.0, 118.0, 108.0, 110.0, 900.0)
chart.show()

Load from JSON

import termichart

chart = termichart.PyChart("candlestick")
chart.size(80, 20)
json_data = termichart.load_json("data.json")
chart.load_json(json_data)
chart.show()

API

Method Description
PyChart(type) Create chart ("line", "candlestick", "bar", "histogram")
.size(w, h) Set chart dimensions
.set_title(str) Set chart title
.add_point(x, y) Add a data point (line/bar/histogram)
.add_candle(time, open, high, low, close, volume) Add OHLCV candle
.load_json(str) Load data from JSON string
.render() Return chart as ANSI string
.show() Print chart to terminal
load_json(path) Read JSON file to string

Chart Types

  • Line — Smooth line charts with area fill using Unicode half-block characters
  • Candlestick — OHLCV charts with wicks and colored bodies (green/red)
  • Bar — Vertical bar charts
  • Histogram — Distribution histograms

Built with Rust

TermiChart's core engine is written in Rust for maximum performance. The Python bindings are generated via PyO3 and built with maturin, giving you native speed with a Pythonic API.

See the full project at github.com/HeyElsa/terminal-chart.

License

MIT

Project details


Download files

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

Source Distribution

termichart-0.1.2.tar.gz (74.3 kB view details)

Uploaded Source

Built Distribution

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

termichart-0.1.2-cp314-cp314-macosx_11_0_arm64.whl (314.4 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

File details

Details for the file termichart-0.1.2.tar.gz.

File metadata

  • Download URL: termichart-0.1.2.tar.gz
  • Upload date:
  • Size: 74.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for termichart-0.1.2.tar.gz
Algorithm Hash digest
SHA256 17f0f8f47fcbb69edb003be381a6861565fceb0f5da82bd77cac12d11438b7b8
MD5 bbeac0e7b556baba9e7c7924413c4960
BLAKE2b-256 e911359821d57ff4aae112c8c950beeac3d73a83d9ed931be3e44478e9718601

See more details on using hashes here.

File details

Details for the file termichart-0.1.2-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for termichart-0.1.2-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e2505c8c261a9fdfc73a2c4091427eaff9be1033b7e7fae448067504389fa61e
MD5 6709971ee236fe799e96f80f2b798f43
BLAKE2b-256 baced46c7865a078596b020cf51f491adb648e6b5dcb2603d1af98aaf6ab1dc6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page