Skip to main content

Spiff up your CLI with color, formatting, and utilities

Project description

Project Description

spiffyline is a terminal utility package that provides formatting, coloring to terminal output via abstraction of ANSI SGR codes.

Features:

  • Abstraction of ANSI SGR codes for ease of use
  • Predefined colors for quick formatting
  • Theme class to combine SGR codes to reuse
  • Utility methods to make adding formatting and color simple and concise

Ussage:

from spiffyline.theme import Theme
from spiffyline.logger import Logger

# Theme with bold and red text
my_theme = Theme.BOLD + Theme.fg_color( 230, 0, 0 )

print(  my_theme + "Hello World!" + Theme.RESET )

# One can also use the Logger class for more concise code

l = Logger()
l.log( "Hello World!", my_theme )

# Or to record certain logging events

l.log( "Error", my_theme, flags=[ "error", ] )
print( l.events[ "error" ] ) # => 1

Please download the API Documentation from GitHub

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

spiffyline-1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

spiffyline-1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file spiffyline-1.0.tar.gz.

File metadata

  • Download URL: spiffyline-1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.2

File hashes

Hashes for spiffyline-1.0.tar.gz
Algorithm Hash digest
SHA256 f8f048ce02ff646cb339c9d2369a1d641937028e107ef17f4bf28ad66982e60e
MD5 2ac0ffa9dc0255709df73c65d0e7bdb7
BLAKE2b-256 6e08e091b77f258db0b69acdc0f557a83376b903a85de8523256fda1c55a49c0

See more details on using hashes here.

File details

Details for the file spiffyline-1.0-py3-none-any.whl.

File metadata

  • Download URL: spiffyline-1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.2

File hashes

Hashes for spiffyline-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93ea08dfcca4ca18a48950ca31a238dd41c6b123003c8dcd059aaa3f8bdd8a0e
MD5 1b64d51352a421f8e0660742cf685210
BLAKE2b-256 fc961822b276cfda35c18c5115999febf9aa77f6fe6ffb893e2e309220879369

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