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:
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)
| File | Size | Uploaded | |
|---|---|---|---|
| rich_sparklines-0.1.5.tar.gz | 2.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|