Skip to main content

😀 Can use unicode symbols on any OS!

Project description

python-figures

😀Can use unicode symbols on any OS!

This project is based on sindresorhus/figures.

Installation

pip install python-figures

Usage

You can see supported symbols on this code or windows. You can also see this example on example.py

from figures import Figures, figures as f


figures = Figures()

print(figures.get('tick'))

figures.add('santa', '🎅🏻')
print(figures.get('santa'))

print(figures.get('nonexistent', default=''))

print(figures.string('✔ ✔ ✔')) # ✔ ✔ ✔ or √ √ √

 # or you can use just like this
print(f('tick'))
print(f(string='✔ ✔ ✔')) # ✔ ✔ ✔ or √ √ √

API

Figure

add(key, default, windows)

You can add custom symbol with this function.

key

Type : String

Unicode symbol's key

default

Type : String

Unicode symbol (like 🎅)

windows

Type : String

if you enter this argument, it return unicode symbol on windows CMD

get(key, default)

Return os friendly unicode symbol with key

key

Type : String

Unicode symbols, see Figures. also you can use custom symbol with add function.

default

Type : String

Return this when nonexistent key argument.

string(string)

replace string for windows CMD.

string

Type : String

String what have unicode symbols.

get_all()

Get all of symbols, include custom symbols

get_keys()

Get all of symbol's keys, include custom symbols


figures(key=None, string=None, default=None)

Return os friendly unicode symbol with key, or replace string for windows CMD.

key

Type : String

Unicode symbols, see Figures.

string

Type : String

String what have unicode symbols.

default

Type : String

Return this when nonexistent key argument.

Figures

Key Default Windows
tick
cross ×
star *
square
squareSmall [ ]
squareSmallFilled [█]
play
circle ( )
circleFilled (*)
circleDotted ( )
circleDouble ( )
circleCircle (○)
circleCross (×)
circlePipe (│)
circleQuestionMark ?⃝ (?)
bullet *
dot .
line
ellipsis ...
pointer >
pointerSmall »
info i
warning
hamburger
smiley
mustache ┌─┐
heart
arrowUp
arrowDown
arrowLeft
arrowRight
radioOn (*)
radioOff ( )
checkboxOn [×]
checkboxOff [ ]
checkboxCircleOn (×)
checkboxCircleOff ( )
questionMarkPrefix ?⃝

License : MIT @ h4wldev

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-figures-1.1.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file python-figures-1.1.tar.gz.

File metadata

  • Download URL: python-figures-1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python-figures-1.1.tar.gz
Algorithm Hash digest
SHA256 a70c3efc51977af563af11eb6001e036256cf6680089150f0d7c7ebff6256243
MD5 16f38828126d832a0a7999fde06cc544
BLAKE2b-256 b2682ee3b699237a1d3bb185159f1b9c3bb32bd9e4112bb3a3651fba706834ac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page