Skip to main content

Helpers for command line interaces (CLI) in terminal

Project description Documentation Status

Buzio is a python library tool for printing formatted text in terminal, similar to termcolor or colored.

Installing Buzio

Install Buzio using the command:

$ pip install buzio

Importing the Library

from buzio import console, formatStr

The console is a instance of the Console class initialized with default color themes. You can also import the class and instantiate with your own settings (See the :doc:reference for more info)

The formatStr is also a instance of the Console class too, but instead of printing in terminal the message, this instance just return the formatted text.

The default color themes


Text Color











These colors are based in colorama constants.

Generate fancy formats

“Section” example 1:

from buzio import console

console.section("First Section")

Terminal output:

$ >> First Section
$ ----------------

Humanize Python objects

Buzio can automatically humanize any python object for printing in terminal:

from datetime import datetime, timedelta
from buzio import console

today =
yesterday = today - timedelta(days=1)
my_dict = {
        "start day": yesterday,
        "end day": today
}, date_format="%a, %b-%d-%Y")

The output on terminal will be (in blue color):

$ *********************************
$ *                               *
$ *  start day: Thu, Feb-01-2018  *
$ *   end day: Fri, Feb-02-2018   *
$ *                               *
$ *********************************

Ask for Input data

You can use Buzio to automatically generate “choose” and “select” questions, based on Python objects:

“Choose” example:

from buzio import console

my_choices = [


Terminal output:

$ 1. Orange
$ 2. Apple
$ 3. Potato
$ Select (1-3): ?

Run terminal commands

You can use Buzio to run terminal commands (using Python subprocess) and get the stdout result:

>>> from buzio import console
>>> ret ="echo HelloWorld!", get_stdout=True, verbose=True)
Cmd: echo HelloWorld!
>>> print(ret)

Further reading

Please check full documentation in

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

buzio-1.1.2.tar.gz (10.9 kB view hashes)

Uploaded source

Built Distribution

buzio-1.1.2-py2.py3-none-any.whl (11.9 kB view hashes)

Uploaded py2 py3

Supported by

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