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.6.tar.gz (5.8 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.6-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py_term_helpers-0.0.6.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.13

File hashes

Hashes for py_term_helpers-0.0.6.tar.gz
Algorithm Hash digest
SHA256 b7dcdc156fbd6cee08936c10afbc32931d5c8ab427d25b9567e659876f095820
MD5 c8cc82eb06b7e12152570afd9c1090a4
BLAKE2b-256 156127acd0b16a846b539c2abef09122b013ec93f2c235be9057e6d09dba742d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for py_term_helpers-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fbbc22e3bc114e4eaa1a3d9f4d958700885c7b01fd356cdf8db07d928864a886
MD5 b436acbf07855050888a0453ae7bcd2b
BLAKE2b-256 9c548ff981884df52a86ff7fa17af6e7587de68237e9c2f596036106342f1eba

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