Skip to main content

A simple package for helpful python terminal outputs

Project description

py-term-helpers

Published package on pypi

https://pypi.org/project/py-term-helpers/

Overview

The py-term-helpers is a lightweight Python terminal debug helper tool designed to streamline the debugging process for developers. Creates a more dynamic output for the terminal with star lines and any console testing visuals. It provides essential functions and utilities to assist in identifying and resolving issues in Python applications directly from the terminal.

Features

  • .term_size:

    • Returns current size of terminal in characters
  • .star_line(char="*") :

    • Prints terminal wide char
  • .center_string_stars(string, char="*") :

    • Prints the string in the center of terminal wide char
  • .term_wrap(string, char="*") :

    • Prints the string in the center of terminal wide char with 2 .star_line above and below
    • Essentially: .star_line() => .center_string_stars() => .star_line()
  • .top_wrap(string, char="*"*) :

    • Clears console and runs .term_wrap()
  • .kv_print(arg) :

    • Prints any given arg as '{arg_variable_name} => {arg_value}'
    • Similar to JavaScript's console.log({ arg }) => "{arg_name: arg_value}"

Getting Started

  1. Installation:

    pip install py-term-helpers
    
  2. Usage:

  from py_term_helpers import term_wrap, star_line, kv_print

  term_wrap("TerminalWrap")
  # Output:
  #****************************TerminalWrap***********************************

  star_line()
  # Output:
  #***************************************************************************

  my_dict = dict({'key': 'value'})
  kv_print(my_dict)
  # Output:
  # key => 'value'

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

py_term_helpers-0.0.7.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

py_term_helpers-0.0.7-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file py_term_helpers-0.0.7.tar.gz.

File metadata

  • Download URL: py_term_helpers-0.0.7.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for py_term_helpers-0.0.7.tar.gz
Algorithm Hash digest
SHA256 7b33fc1dca2179c7a71e88030be35b39798e2534847949f5f4b25d3cea6652eb
MD5 83626e58c8fef2c8d29cac9d0a7d6d85
BLAKE2b-256 cddf33b8bd77f71044763215b764e7e61961ba1251eb79d589611b66e8277927

See more details on using hashes here.

File details

Details for the file py_term_helpers-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for py_term_helpers-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e2e2a70cd9c2806e93553bee888038c318c6d17a7e171b3fa392c374ac892d86
MD5 2ad561cab2384a4b631f4b3083f4e40f
BLAKE2b-256 3b095400ab0a0963357a5cb09a0bd120a35f90944728533dab53ddd7722c6ae8

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