Skip to main content

A customizable terminal UI toolkit with beautiful banners and colored logging

Project description

ToolsCord

A customizable terminal UI library with a centered banner and advanced logging features. ToolsCord provides colorful, styled terminal output with different log types, custom styling, and formatting options.

Features

  • Single-line "TOOLS CORD" banner display with gradient colors
  • Personal logger style with "{time} • {type} > message" format
  • Various log types with appropriate styling: info, success, warning, error, debug, etc.
  • Custom color palette including special colors like Twitter Blue and Cloudflare Orange
  • Customizable text formatting: colors, bold text, underlines
  • Customizable bullet styles between time and type
  • Timestamps on log messages
  • Divider lines

Installation

You can install ToolsCord directly from GitHub:

pip install toolscord

Usage

Basic Usage

from toolscord import Logger, display_banner, ToolsCordColors

# Display the TOOLSCORD banner
display_banner()

# Create a logger instance
logger = Logger()

# Use different log types
logger.info("This is an information message")
logger.success("Operation completed successfully")
logger.warning("This is a warning message")
logger.error("An error occurred")

Customizing the Output

# Create a logger without timestamps
logger = Logger(show_time=False)

# Use formatting options
logger.log("Bold text", bold=True)
logger.log("Underlined text", underline=True)
logger.log("Custom color", color=ToolsCordColors.PINK)
logger.log("Twitter Blue color", color=ToolsCordColors.TWITTERBLUE)

# Print a divider
logger.divider("=", 60, ToolsCordColors.CYAN)

Customizing the Banner

from toolscord import display_banner, ToolsCordColors

# Display the banner with different base colors
display_banner(base_color=ToolsCordColors.TWITTERBLUE)

Logger Usage

from toolscord import Logger, ToolsCordColors

# Create a logger with default settings
logger = Logger()

# Basic log types
logger.info("This is an information message")     # {time} • INFO > This is an information message
logger.warning("This is a warning message")       # {time} • WARN > This is a warning message
logger.error("An error occurred")                 # {time} • ERROR > An error occurred
logger.success("Operation completed")             # {time} • SUCCESS > Operation completed

# Custom bullet style
logger = Logger(bullet_style="→")
logger.info("Using arrow bullet style")           # {time} → INFO > Using arrow bullet style

# Try other bullet styles
logger = Logger(bullet_style="⌁")                 # Zigzag
logger = Logger(bullet_style="⨠")                 # Square donut
logger = Logger(bullet_style="‣")                 # Triangle 
logger = Logger(bullet_style="⁕")                 # Flower
logger = Logger(bullet_style="⁙")                 # Dot pattern

# Without timestamp
logger = Logger(show_time=False)
logger.info("No timestamp shown")                 # INFO > No timestamp shown

Available Colors

ToolsCord provides a range of predefined colors that you can use:

from toolscord import ToolsCordColors

# Basic colors
ToolsCordColors.CYAN        # Cyan color
ToolsCordColors.SUCCESS     # Green color for success
ToolsCordColors.WARNING     # Yellow color for warnings
ToolsCordColors.FAIL        # Red color for errors
ToolsCordColors.PURPLE      # Purple color
ToolsCordColors.DEEPBLUE    # Deep blue color

# Special colors
ToolsCordColors.PINK              # Pink color
ToolsCordColors.TWITTERBLUE       # Twitter blue brand color
ToolsCordColors.CLOUDFLARE_ORANGE # Cloudflare orange brand color

Example

See example.py and color_demo.py for a complete demonstration of ToolsCord's features.

Requirements

  • Python 3.6+

License

MIT

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

toolscord-0.2.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

toolscord-0.2.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file toolscord-0.2.1.tar.gz.

File metadata

  • Download URL: toolscord-0.2.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.12.1.2 readme-renderer/44.0 requests/2.28.2 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.67.1 importlib-metadata/8.7.0 keyring/25.6.0 rfc3986/1.5.0 colorama/0.4.6 CPython/3.11.6

File hashes

Hashes for toolscord-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2c3d8b7e66040d7c48c9def79a28733cb154d25802ebf52e9bdb7ae470e6c83b
MD5 104461e4cf7cc1906c0a79c34aa4b256
BLAKE2b-256 5e3b3f9f5868eb582d651d5d7c8906d178d5d19c3892dbdbe350340b08f2b71e

See more details on using hashes here.

File details

Details for the file toolscord-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: toolscord-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.12.1.2 readme-renderer/44.0 requests/2.28.2 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.67.1 importlib-metadata/8.7.0 keyring/25.6.0 rfc3986/1.5.0 colorama/0.4.6 CPython/3.11.6

File hashes

Hashes for toolscord-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f033561f333136e4345caa106d454af8dc723a355b4eb1d16fe3b68cfd5cb1fc
MD5 3be535aca012c18ed98afbfccb292172
BLAKE2b-256 cdd8ce40026eaa9df29665a184027a313d1c761dd272694ac990f161a00c82f6

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