Registry / serialization / art
library6.5pypypi✓ verified 23d ago

ART is a Python library for converting text to ASCII art and generating 1-line ASCII art. It's currently at version 6.5 and is actively maintained with frequent releases, adding new fonts and features, and dropping support for older Python versions.

pip install art
INSTALL
IMPORT
SIG · ART
A
art
serializationpythonv6.5
Install
1.8s avg
Import
1458ms
Disk
23MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v6.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.524s · 24.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 1.392s · 25MB
23MB installed
● package 23MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

text2art
from art import text2art
import art; art.text2art()
The primary functions like `text2art` are directly importable. While `from art import *` is often used in examples, explicit imports are generally recommended.
art
from art import art
import art; art.art()
The `art` function generates 1-line ASCII art and can be directly imported for clarity.

Demonstrates converting a string to multi-line ASCII art using a specified font and generating a random 1-line ASCII art.

from art import text2art from art import art # Convert text to ASCII art ascii_text = text2art("Hello, World!", font="block") print(ascii_text) # Generate a 1-line ASCII art one_line_art = art("coffee") print(one_line_art) # Example of using a non-default font for 1-line art (if supported) # try: # fancy_art = art("random", font="hideki") # Note: 'random' often doesn't use font arg explicitly # print(fancy_art) # except Exception as e: # print(f"Could not generate fancy art: {e}")
art --version
Debug
Known issues
breakingPython 3.6 support has been dropped as of version 6.5. Ensure your environment uses Python 3.7 or newer. Earlier versions (v6.0) dropped Python 2.7 and 3.4.
fix
Upgrade your Python interpreter to version 3.7 or higher.
affects: 6.5 and later
breakingVersion 6.3 introduced significant internal restructuring, renaming modules and core dictionaries. For example, `art_param` changed to `params`, the `art` module was split, and `text_dic1`, `art_dic`, `decor_dic` were renamed to `fonts1`, `arts`, and `decorations` respectively. Direct access to these internal structures will break.
fix
Review release notes for v6.3 and update code paths or variable names if directly interacting with previously exposed internal modules or dictionaries.
affects: 6.3 and later
gotchaSome terminal environments or fonts may not fully support all 1-line ASCII arts or complex multi-line art characters, leading to display issues or missing characters.
fix
Test in your target environment. Consider using more universally supported fonts or simpler arts if broad compatibility is required. The library's output is string-based, so environment rendering is a factor.
affects: All versions
gotchaWhen incorporating multiline ASCII art directly into Python code as f-strings or triple-quoted strings, be mindful of indentation. Python's indentation rules can introduce unwanted leading spaces to each line of the ASCII art, misaligning it in the output.
fix
Place multiline strings at the beginning of the line, or use `textwrap.dedent()` to programmatically remove unwanted whitespace.
affects: All versions
gotchaThe `art()` and `text2art()` functions are strict about parameter types. For instance, `artname` must be a `str` and `number` must be an `int`. Providing incorrect types will raise an `artError`.
fix
Always ensure function arguments match the expected data types (e.g., `art("coffee")`, `art("woman", number=2)`). Refer to the documentation for specific function signatures.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'art'
The 'art' module is not installed in the Python environment.
fix
Install the 'art' module using the command: pip install art
ModuleNotFoundError: No module named 'art' when running PyInstaller executable
PyInstaller fails to include the 'art' module in the standalone executable.
fix
Use the command: pyinstaller --onefile --add-data="art/*;art" your_script.py
ImportError: cannot import name 'art' from 'art'
A naming conflict occurs due to a local script named 'art.py' shadowing the installed 'art' module.
fix
Rename the local script to avoid the naming conflict.
TypeError: 'module' object is not callable
You are attempting to call the 'art' module itself as a function, rather than calling a specific function (like `art()` or `text2art()`) from within the module.
fix
If you imported with `import art`, call functions like `art.art('text')` or `art.text2art('text')`. If you intended to use the top-level `art()` function directly, use `from art import art` then `art('text')`.
art.artError: The 'artname' type must be str.
The `art()` function was called with an argument that is not a string, but it expects a string representing the art name.
fix
Ensure the argument passed to `art()` is a string: `from art import art; print(art('coffee'))`
Upgrade
Version history
6.5latest on PyPI · released Apr 12, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
24
OpenAI (training)
1
Resources
art — pip install art · libregistry