Create simple and beautiful boxes in the terminal.
The preferred method of installation is through pip.
Just execute,
pip install -U boxcli
That will install boxcli, or if you already have boxcli it will update it to the latest version, pretty neat right?
-
Remove redudant exception from codebase,
DifferentLengthError
. -
Use
rich
for cross-platform colour support. -
Allow custom border colours with the
RGB
class.
You can use boxcli in your application very easily. Here is an example:
import boxcli
# Create a box factory.
factory = boxcli.BoxFactory(
20,
5,
boxcli.BoxStyles.ROUND,
colour=boxcli.RGB((255, 255, 0)),
)
# Create a box.
box = factory.get_box("This is the title of the box", "This is the content of the box")
# Print it! as easy as that.
print(box)
With the 1.4.0 update of boxcli, you can now specify the colour of the box border too.
In-depth documentation can be found here.
-
There are 8 different inbuilt box styles.
-
Custom box styles support.
-
Colour (with option for custom RGB colours) support for box border.
-
Support for non-latin alphabet characters.
-
Specify title positions and content aligment according to your need.
Pull requests are welcome!
This package is a port of the package box-cli-maker written by Delta456 in Go.
boxcli is licensed under the MIT license.