Skip to main content

Download stats for Python packages

Project description

termcharts

Terminal charts with rich compatibility in mind

bar

import termcharts


chart = termcharts.bar({'roll': 24, 'bread':10, 'rice':30, 'pasta':50}, title='brunches')
print(chart)

pie

import termcharts


chart = termcharts.pie({'pencil':10, 'eraser': 20, 'ruler': 30}, title='stationary')
print(chart)

doughnut

import termcharts


chart = termcharts.doughnut({'a':10, 'b': 20, 'c': 30}, title='aphabet dist')
print(chart)

Rich compatibility

from termcharts import pie
from termcharts import doughnut
from termcharts import bar

from rich.console import Console
from rich.columns import Columns
from rich.panel import Panel

console = Console()

charts = [
    doughnut({'a':10, 'b': 20, 'c': 30, 'd': 20}, title='aphabet dist', rich=True), 
    pie({'wefwefqwddwqdqwda':10, 'b': 20, 'c': 30, 'd': 20}, rich=True),
    bar({'roll': 24, 'bss':10, 'wes':30, 'ewfwef':50}, title='Brunches', rich=True)
    ]
user_renderables = [Panel(x, expand=True) for x in charts]
console.print(Columns(user_renderables))

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

termcharts-1.0.0.tar.gz (28.5 kB view details)

Uploaded Source

File details

Details for the file termcharts-1.0.0.tar.gz.

File metadata

  • Download URL: termcharts-1.0.0.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for termcharts-1.0.0.tar.gz
Algorithm Hash digest
SHA256 aa99c0282577d6688a080d90d7ef547095a92e9ed3656b9d8650fe23cdac947e
MD5 bb488f89d27caab6b42bcf5ea38c0c9d
BLAKE2b-256 61e3359ba764b24cf62b10e71e2eae5991e7bd23391d36d42e177b3af4e03073

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