Skip to main content

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

Metadata

Release files for rich-sparklines 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rich-sparklines 0.1.5
File Size Uploaded
rich_sparklines-0.1.5.tar.gz 2.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rich-sparklines 0.1.5
File Interpreter ABI Platform
rich_sparklines-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 4.0 kB

Release files / rich_sparklines-0.1.5.tar.gz

Download URL rich_sparklines-0.1.5.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
999ed9362c9074598d3339c5cdbc3569cdc3f885fc3328d7626a72043872b5da
BLAKE2b-256 checksum
How to use checksums
5b47c640715cec3a621352d2808e2cca560cbf09af6007f82cb04ed5b940a89c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.5 Windows/10

Release files / rich_sparklines-0.1.5-py3-none-any.whl

Download URL rich_sparklines-0.1.5-py3-none-any.whl
Size 2.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2001de32c6dbe33a925a5cd53907c0b4e06e1eabe507d3cbf26f25ea7e02a126
BLAKE2b-256 checksum
How to use checksums
1eb6795e6767460b7ce3c7ff7493664d4637a5ecdb1ba09a9a8d7c55efadd98a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.5 Windows/10

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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