Skip to main content

PyPI - Python Version PyPI

Discord PyPI - Downloads YouTube Channel Subscribers

Logo

This is a very simple library to visualize lists in Python.

It was created mainly to support the creation of tutorials for Neps Academy (amazing website :D).

Install

pip install visualist

Usage

The minimal example is shown below. It supposes that we want to create an image from the list [1, 2, -4, 2, -2, 5] and highlight the indexes [2, 4].

from visualist import Visualist

visualist = Visualist()

img = visualist.img_from_list([1, 2, -4, 2, -2, 5], highlight_indexes=[2, 4])
img.show()

The result of this code would be

example

If you want to save the image change img.show() to img.save('my_dear_list.png').

If you use the method img_from_lists it will work with a list of lists. Note that the highlights also need to be a list of lists.

from visualist import Visualist

visualist = Visualist()

img = visualist.img_from_lists([[1, 2, -4, 2, -2, 5], [1, 2, 3, 4]], highlight_indexes=[[2, 4], [1]])
img.show()

The result will be

example

Building the library

To build the library you need the wheel module:

pip install wheel

and run the following command:

python setup.py sdist bdist_wheel

To upload a new version use (don't forget to update the version number in setup.py):

twine upload dist/*

Metadata

Release files for visualist 0.3.0

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

Source distribution (sdist)

Source distribution for visualist 0.3.0
File Size Uploaded
visualist-0.3.0.tar.gz 85.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for visualist 0.3.0
File Interpreter ABI Platform
visualist-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 169.5 kB

Release files / visualist-0.3.0.tar.gz

Download URL visualist-0.3.0.tar.gz
Size 85.9 kB
Tags Source
SHA-256 checksum
How to use checksums
48fd1c5dcb632babba8ebe847756726c1e8563d91991d20546d0ac27158805e2
BLAKE2b-256 checksum
How to use checksums
246907b0c40a743ed43610689aaf9f489a559036d93803480ca41ec7948c13c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release files / visualist-0.3.0-py3-none-any.whl

Download URL visualist-0.3.0-py3-none-any.whl
Size 83.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afe1103e4d72c64cb79fc455a484aaba91e67d9fe2e292315a1c51eb6d9da7f7
BLAKE2b-256 checksum
How to use checksums
e01875f2d951e11dabc71b0ee4e6c3eb7c07bb5430a6b402b84e3c329466a565
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

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