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.

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.1.tar.gz (74.0 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.1-cp314-cp314-macosx_11_0_arm64.whl (314.3 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for termichart-0.1.1.tar.gz
Algorithm Hash digest
SHA256 84cd5a12d8995fdb1579e618a1b608070bc92203eae5917629cce5ba8f7eacf4
MD5 2481b3e773bb6c72a6cefa44d5b12f87
BLAKE2b-256 38b9fdb26b2b17286f137b055ac7e9b746a99e7863f2d775b546765219b0cb66

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for termichart-0.1.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4bb8ae583dbd5d9342f2c7a2df9297a54fd6fb5ceb7ee0d98b3059017f6a47e2
MD5 3825f351e1baa4e8777c7ed6eda40de7
BLAKE2b-256 659ab4d0c7dce9a395d72a8d44d1f811463c567708740eb19d9c655c3e92a667

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