Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

art

> DevOps
Open source

ASCII art library for Python

2.5K stars0 likes1 views
WebsiteGitHub

About

ASCII art library for Python


Overview

ASCII art is also known as "computer text art". It involves the smart placement of typed special characters or letters to make a visual shape that is spread over multiple lines of text.

ART is a Python lib for text converting to ASCII art fancy. ;-)

Open Hub
PyPI Counter
Github Stars
Font Counter 677
1-Line-Art Counter 711
Decor Counter 218
Branch master dev
CI
Code Quality

Usage

1-Line art

⚠️ Some environments don't support all 1-Line arts

⚠️ ART 4.6 is the last version to support Bipartite art

1. art

This function return 1-line art as str in normal mode and raise artError in exception.

pycon
>>> from art import *
>>> art_1=art("coffee") # return art as str in normal mode
>>> print(art_1)
c[_]
>>> art_2=art("woman",number=2) # return multiple art as str
>>> print(art_2)
▓⚗_⚗▓ ▓⚗_⚗▓ 
>>> art("coffee", number=3, space=5) 
'c[_]     c[_]     c[_]'
>>> art("random") # random 1-line art mode
'(っ◕‿◕)っ '
>>> art("rand")   # random 1-line art mode
't(-_-t) '
>>> art(22,number=1) # raise artError
Traceback (most recent call last):
        ...
art.art.artError: The 'artname' type must be str.

2. aprint

This function print 1-line art in normal mode (return None) and raise artError in exception.

pycon
>>> aprint("butterfly") # print art
Ƹ̵̡Ӝ̵̨̄Ʒ 
>>> aprint("happy") # print art
 ۜ\(סּںסּَ` )/ۜ
>>> aprint("coffee", number=3, space=5) 
c[_]     c[_]     c[_] 
>>> aprint("random") # random 1-line art mode
'(っ◕‿◕)っ '
>>> aprint("rand")   # random 1-line art mode
't(-_-t) '
>>> aprint("woman",number="22") # raise artError
Traceback (most recent call last):
        ...
art.art.artError: The 'number' type must be int.

3. randart

randart function is added in Version 2.2 as art("random") shortcut.

pycon
>>> randart()
'ዞᏜ℘℘Ꮍ ℬℹℛʈዞᗬᏜᎽ '
>>> randart()
'✌(◕‿-)✌ '
```	

ℹ️ Use `ART_NAMES` to access all arts name list (new in `Version 4.2`)

ℹ️ Use `NON_ASCII_ARTS` to access all Non-ASCII arts name list (new in `Version 4.6`)

ℹ️ Use `ASCII_ARTS` to access all ASCII arts name list (new in `Version 5.7`)

### ASCII text
	
⚠️ Some fonts don't support all characters		

⚠️ From `Version 3.3` Non-ASCII fonts added (These fonts are not compatible with some environments)

⚠️ From `Version 5.3` `\n` is used as the default line separator instead of `\r\n` (Use `sep` parameter if needed)

#### 1. text2art				

This function return ASCII text as `str` in normal mode and raise `artError` in exception.

…


#### 2. tprint				

This function print ASCII text in normal mode (return None) and raise `artError` in exception.

…


#### 3. tsave				

This function return `dict` in normal and exception mode.

…


ℹ️ Use `FONT_NAMES` to access all fonts name list (new in `Version 4.2`)

ℹ️ Use `NON_ASCII_FONTS` to access all Non-ASCII fonts name list (new in `Version 4.4`)

ℹ️ Use `ASCII_FONTS` to access all ASCII fonts name list (new in `Version 5.7`)

### Line

#### 1. lprint

This function prints a grid (`length` by `height`) of any given character in normal mode and raise `artError` in exception.
```pycon
>>> lprint(length=15, height=2, char="*")
***************
***************

ℹ️ New in Version 6.4

ℹ️ The default values are length=15, height=1, char='#'

2. line

This function returns a grid (length by height) of any given character as str in normal mode and raise artError in exception.

pycon
>>> line(length=15, height=2, char="*")
'***************\n***************'

ℹ️ New in Version 6.4

ℹ️ The default values are length=15, height=1, char='#'

Decoration

⚠️ Some environments don't support all decorations

1. decor

This function return decoration as str in normal mode and raise artError in exception.

…

ℹ️ Use DECORATION_NAMES to access all decorations name list (new in Version 4.6)

Font modes

These modes are available for text2art, tprint & tsave.

1. Font name

⚠️ Some fonts don't support all characters

…

2. Random

Randomly select from all fonts.

Keywords : random, rand & rnd

pycon
>>> tprint("test",font="random")
 |       | 
~|~/~/(~~|~
 | \/__) | 
  

3. Random small

Randomly select from small fonts.

Keywords : rnd-small, random-small & rand-small

ℹ️ New in Version 2.8

pycon
>>> tprint("test",font="rnd-small")
             
_/  _   _ _/ 
/  (- _)  /  
             

4. Random medium

Randomly select from medium fonts.

Keywords : rnd-medium, random-medium & rand-medium

ℹ️ New in Version 2.8

pycon
>>> tprint("test",font="rnd-medium")
                      
  ,                ,  
 ||               ||  
=||=  _-_   _-_, =||= 
 ||  || \\ ||_.   ||  
 ||  ||/    ~ ||  ||  
 \\, \\,/  ,-_-   \\, 
                      
                      

5. Random large

Randomly select from large fonts.

Keywords : rnd-large, random-large & rand-large

ℹ️ New in Version 2.8

…

6. Random xlarge

Randomly select from xlarge fonts.

Keywords : rnd-xlarge, random-xlarge & rand-xlarge

ℹ️ New in Version 2.8

…

7. Wizard

This mode consider length of input text to select font

☑️ Support of 95 ASCII characters guaranteed

Keywords : wizard, wiz & magic

ℹ️ New in Version 2.9

…

8. Random Non-ASCII

Randomly select from Non-ASCII fonts.

Keywords : random-na, rand-na & rnd-na

ℹ️ New in Version 3.4

pycon
>>> tprint("test","random-na")
₮Ɇ₴₮
>>> tprint("test","random-na")
ʇsǝʇ

9. Mix Non-ASCII

Randomly mix Non-ASCII fonts.

Keywords : mix

ℹ️ New in Version 3.7

pycon
>>> tprint("test","mix")
†Ɛѕ†
>>> tprint("test","mix")
tᏋѕt
>>> tprint("test","mix")
꓄єร꓄

⚠️ Non-ASCII fonts are only available in Font name, Random Non-ASCII and Mix modes

Typo-tolerance

Levenshtein distance used in this project. (Version >0.9)

…

Set defaults

set_default function is added in Version 2.2 in order to change default values.

…

ℹ️ Functions error response updated in Version 0.8

Function Normal Output Error
decor str raise artError
art str raise artError
aprint None raise artError
tprint None raise artError
tsave {"Status":bool,"Message":str} {"Status":bool,"Message":str}
text2art str raise artError
lprint None raise artError
line str raise artError
set_default None raise artError

Testing

  • Only ASCII fonts and arts :
art test
  • All fonts, arts and decorations :
art test2

CLI

⚠️ [Backward Compatibility] ART 5.9 is the last version to support this CLI structure officially

⚠️ You can use art or python -m art to run this mode

  • List of arts : art list or art arts
  • List of fonts : art fonts
  • Text : art text [yourtext] [fontname(optional)]
  • Art : art shape [artname] or art art [artname]
  • Save : art save [yourtext] [fontname(optional)]
  • All : art all [yourtext]

Telegram bot

Just send your text to one of these bots.

Try ART in your browser

  1. ART can be used online in interactive Jupyter Notebooks via the Binder service! Try it out now! :
  • Open FontList.ipynb, ArtList.ipynb and DecorList.ipynb
  • Edit and execute each part of the notes, step by step from the top panel by run button
  1. ART also can be used online in ascii-generator.site, a Django website by hermanTenuki

Screen record

  • View full font list (Link1,Link2)
  • View full art list (Link1,Link2)
  • View full decoration list (Link1,Link2)

Issues & bug reports

  1. Fill an issue and describe it. We'll check it ASAP!
    • Please complete the issue template
  2. Discord : https://discord.com/invite/FAAyq3QJqP
  3. Website : https://www.ascii-art.site
  4. Email : [email protected]

References

  1. FIGlet
  2. 1 Line Art
  3. Text to ASCII
  4. ASCII Generator
  5. Asky
  6. Flipyourtext
  7. YayText
  8. Coolletters
  9. Instagram Fonts
  10. Cool Symbol
  11. ASCII Moji
  12. SMILEY COOL
  13. SPREZZ
  14. Textart4u
  15. Chat4o
  16. Findwebapp
  17. Hubpages
  18. ASCII-ART
  19. Messletters
  20. Webestools
  21. ASCII-emoji
  22. Instagram Fonts2

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Pythonartasciiascii-artascii-art-library

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理