Skip to main content

Dead simple terminal framing, tables and underlining – with proper wide‑character support.

Project description

framify 🖼️

Dead simple terminal framing, tables and underlining – with proper wide‑character support.

Why?

Building CLI tools often means manually aligning borders and tables, counting spaces for CJK characters or emoji. framify does the boring geometry for you, so you can focus on content.

Install

pip install framify

Quick examples

  1. Box
from framify import frame

print(frame("Hello\nWorld"))
┌───────┐
│ Hello │
│ World │
└───────┘
  1. Box with title and padding
print(frame("Success!", style="double", padding=2, title=" STATUS "))
  1. Table
from framify import table

data = [
    ["Alice", "32", "Engineer"],
    ["Bob", "28", "Designer"],
]
print(table(data, headers=["Name", "Age", "Job"], style="rounded"))
  1. Underline
from framify import underline

print(underline("Important"))

Style gallery

· single (default) · double · ascii · rounded · heavy

All handle CJK and emoji widths correctly thanks to wcwidth.

API

frame(text, *, style='single', padding=1, title=None, align='left')

Wrap multi‑line text in a box.

table(data, *, headers=None, style='single', col_align=None)

Format a list of lists as a table.

underline(text, char='─')

Return underlined text.

overline(text, char='─')

Return overlined text.

strikethrough(text, char='─')

Visual strikethrough (line below text).

License

MIT © itz_rival

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

framify-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

framify-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file framify-0.1.0.tar.gz.

File metadata

  • Download URL: framify-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for framify-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25c0a88b46f2792518cb38d35e31d8c96d2d5cde5bc0509789133ee470a4e2c1
MD5 afd2a6df2945af4cb6f0aa0b3cf44ab8
BLAKE2b-256 f6f8224851744ae48251f83eaae53d44de8effc927f778480c47c7e80920c706

See more details on using hashes here.

File details

Details for the file framify-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: framify-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for framify-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbc9f639b59d60db2dee7e29cfe0f4c3c202cd270d89cab18043901dd67549a1
MD5 ce0558e2c791568fb40aed07f3aff598
BLAKE2b-256 6736f089cdd1da8760fdd63098bce70e91b5019af7c397b4d2d58417c47c84b6

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