This project is a branch of term-image on QPython.
Quick Start
Creating an instance
-
Initialize with a file path:
from term_image.image import from_file image = from_file("path/to/image.png")
-
Initialize with a URL:
from term_image.image import from_url image = from_url("https://www.example.com/image.png")
-
Initialize with a PIL (Pillow) image instance:
from PIL import Image from term_image.image import AutoImage img = Image.open("path/to/image.png") image = AutoImage(img)
Drawing/Displaying an Image
There are two basic ways to draw an image to the terminal screen:
-
Using the
draw()method:image.draw()
NOTE:
draw()has various parameters for render formatting. -
Using
print()with an image render output:print(image) # without formatting # OR print(f"{image:>200.^100#ffffff}") # with formatting
For animated images, only the former animates the output, the latter only draws the current frame.
See the tutorial for a more detailed introduction.
Usage
🚧 Under Construction - There will most likely be incompatible changes between minor versions of version zero!
If you want to use this library in a project while it's still on version zero, ensure you pin the dependency to a specific minor version e.g >=0.4,<0.5.
See the docs for the User Guide and API Reference.
Metadata
Release files for term-image-qpython 0.7.2.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 |
|---|---|---|---|---|
| term_image_qpython-0.7.2.1.tar.gz | 55.1 kB | Without provenance | Details for term_image_qpython-0.7.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| term_image_qpython-0.7.2.1-py3-none-any.whl | Python 3 | none | any | Details for term_image_qpython-0.7.2.1-py3-none-any.whl |
Total release size: 116.5 kB
Release files / term_image_qpython-0.7.2.1.tar.gz
| Download URL | term_image_qpython-0.7.2.1.tar.gz |
|---|---|
| Size | 55.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de8524c3b4cc822eb5ee0e84c9c4a58a1e5418f5c237a7067ca4b90291294d45
|
|
BLAKE2b-256 checksum How to use checksums |
5c12afe4985fab322b3cb746cb5be6b5f52669a17a6547a30870f41f037eec3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.7
|
Release files / term_image_qpython-0.7.2.1-py3-none-any.whl
| Download URL | term_image_qpython-0.7.2.1-py3-none-any.whl |
|---|---|
| Size | 61.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c10059115e2a4a22080ccb5b02868722e404aad205c6833bfa13dfb1005ef7e4
|
|
BLAKE2b-256 checksum How to use checksums |
b5f7a067b225fc057ddcd60843f8b5d389907cdf4f5b82d01a10120f826d9f0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.7
|
Security for term-image-qpython 0.7.2.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.