Skip to main content

asciiify

Python library and CLI for converting images and videos to ASCII art. Powered by Rust via PyO3.

Part of the asciiify project.

Pikachu

Install

pip install asciiify

Building from Source

Requires Rust and maturin.

git clone https://github.com/tomerramk/asciiify.git
cd asciiify/crates/asciiify-py

pip install maturin

# Build and install into the active Python environment
maturin develop --release

# Or build a wheel and install it
maturin build --release
pip install ../../target/wheels/asciiify-*.whl

CLI

Installing the package also provides the asciiify command:

# Convert an image
asciiify image.png

# Braille mode, custom width
asciiify image.jpg -m braille -w 100

# Output to file
asciiify image.png -o output.txt

# Play a video
asciiify video.mp4

# Play a video at a specific FPS
asciiify video.mp4 --fps 30

# All options
asciiify --help

Or via python -m:

python -m asciiify image.png -m half-block -w 80

Library Usage

import asciiify

# Convert image file
art = asciiify.convert("image.png")
print(art)

# With options
art = asciiify.convert("image.jpg", mode="braille", width=100, height=50)

# Convert from bytes
with open("image.png", "rb") as f:
    data = f.read()
art = asciiify.convert_bytes(data, mode="half-block", width=80)

# Reusable converter
converter = asciiify.Converter(mode="ascii", width=120, invert=True)
art = converter.convert("image.png")

# Video: iterate frames as ASCII strings
from asciiify import VideoFrames

frames = VideoFrames("video.mp4", width=80)
print(f"FPS: {frames.fps}")
for frame in frames:
    print(frame)

Video Support

Video support is included by default. FFmpeg is downloaded automatically on first use.

from asciiify import VideoFrames

frames = VideoFrames("video.mp4", width=80)
print(f"FPS: {frames.fps}")
for frame in frames:
    print(frame)

Build note: when building from source, video is included in the default build:

maturin develop

Output Modes

Mode Description
"ascii" Classic character ramp (default)
"half-block" Unicode blocks, 2x vertical resolution
"braille" Unicode braille, 4x vertical resolution

API

convert(path, *, mode="ascii", width=None, height=None, invert=False, charset=None) -> str

Convert an image file to ASCII art.

convert_bytes(data, *, mode="ascii", width=None, height=None, invert=False, charset=None) -> str

Convert in-memory image bytes to ASCII art.

Converter(*, mode="ascii", width=None, height=None, invert=False, charset=None)

Reusable converter with preset options. Has .convert(path) and .convert_bytes(data) methods.

License

MIT

Metadata

Release files for asciiify 0.4.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 asciiify 0.4.0
File Size Uploaded
asciiify-0.4.0.tar.gz 30.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for asciiify 0.4.0
File
asciiify-0.4.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
asciiify-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details
asciiify-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
asciiify-0.4.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
asciiify-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 12.3 MB

Release files / asciiify-0.4.0.tar.gz

Download URL asciiify-0.4.0.tar.gz
Size 30.9 kB
Tags Source
SHA-256 checksum
How to use checksums
40ea0de184f9f4ee5ac1c25f3e02c445a302862ca2f63f3845cfc164fa11b6ea
BLAKE2b-256 checksum
How to use checksums
e0ab085c48bb89613366699aeb3cf839254ad771897b0c31fc43cb9f5f3d51ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 2, 2026.

Transparency log

Release files / asciiify-0.4.0-cp39-abi3-win_amd64.whl

Download URL asciiify-0.4.0-cp39-abi3-win_amd64.whl
Size 2.1 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e2659a6e2ee843b1a8393937ab8de9e9719430acb8a3268bd13e879ecf1dea88
BLAKE2b-256 checksum
How to use checksums
12015f37def59677261694ec2e758365cb5baed4f012526fe958d94b5aae6ffa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 2, 2026.

Transparency log

Release files / asciiify-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL asciiify-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl
Size 2.8 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
a2b427cb4f46e1fcd1edfd8af61476ff84e1f8521c3533d8ee55e1d3ddf1e271
BLAKE2b-256 checksum
How to use checksums
f21388116726f88907c89ef66903f16cd1766d47e2a0ccd8a970697855225b38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 2, 2026.

Transparency log

Release files / asciiify-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL asciiify-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
fc9b359b5d0c2957e5d3ff2d144f0a08d71aba92e6995ded4e1c39466d2f260e
BLAKE2b-256 checksum
How to use checksums
f7461a85189ced1ff1c26533a20c5f7d4f780f08d9e1add6e14e35ddc6600b05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 2, 2026.

Transparency log

Release files / asciiify-0.4.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL asciiify-0.4.0-cp39-abi3-macosx_11_0_arm64.whl
Size 2.2 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c1ee0b401839ab7180165102465e02869323b25b8e3c66b41db8c79597697cef
BLAKE2b-256 checksum
How to use checksums
bd0a989cca4bd2b38bb854dc81e59f7676b80bf984e347dabbb5b680e7ae9bee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 2, 2026.

Transparency log

Release files / asciiify-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL asciiify-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 2.3 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d591eab4e0b414df415d8cfba573c4b3fb89a4c444df3b0f28e74111861d3b58
BLAKE2b-256 checksum
How to use checksums
3a94980ea761d8bc9cf8328b2d398644b4e314e56f790f489642754f5ea4a3f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

6 release files

0.3.0

6 release files

0.2.0

6 release files

0.1.0

6 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