Skip to main content

Integrate rich and sparklines libraries

Project description

Something like this:

import os
import random
import time

from rich.console import Console

from rich_sparklines import Graph

console = Console()


def main():
    graph = Graph("connections", lambda: random.randint(0, 20))
    while True:
        graph.update()

        os.system("cls")

        console.print(graph)

        time.sleep(1)


if __name__ == "__main__":
    main()

will produce something like this:

Example

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

rich_sparklines-0.1.5.tar.gz (2.0 kB view hashes)

Uploaded Source

Built Distribution

rich_sparklines-0.1.5-py3-none-any.whl (2.0 kB view hashes)

Uploaded Python 3

Supported by

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