teimpy
Python library for displaying image on terminal.
Installation
$ pip
Example
import numpy as np
from teimpy import get_drawer, Mode
R = np.array([1.0, 0, 0])
G = np.array([0, 1.0, 0])
B = np.array([0, 0, 1.0])
def _get_color(x, y):
tmp = (y * (1.0 - x) * R + (1.0 -y ) * x * G + (1.0 - y) * (1.0 - x) * B)
return (255 * tmp).astype(np.uint8)
tics = np.linspace(0, 1, 128)
xs, ys = np.meshgrid(tics, tics)
buffer = np.vectorize(_get_color, signature='(),()->(3)')(xs, ys)
print(get_drawer(Mode.ITERM2_INLINE_IMAGE).draw(buffer))
Feature
- Resize images to fit terminal size.
- Drawing with iterm2 inline image.
- Drawing with Braille fonts.
- Drawing with half block fonts.
License
This software is released under the MIT License, see LICENSE.
Metadata
Release files for teimpy 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| teimpy-0.1.1.tar.gz | 15.8 kB | Without provenance | Details for teimpy-0.1.1.tar.gz |
Release files / teimpy-0.1.1.tar.gz
| Download URL | teimpy-0.1.1.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
023a58caf95069c3d388db4217cff97172b639e67ec97d815b82288a0fb4a309
|
|
BLAKE2b-256 checksum How to use checksums |
3a34ab1533d6af29920ee90eac1c8da293e3767481ee27c377f6670c512e6407
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.3 CPython/3.6.9 Linux/4.15.0-74-generic
|
Security for teimpy 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.