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.5.tar.gz (3.1 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.5-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for py_term_helpers-0.0.5.tar.gz
Algorithm Hash digest
SHA256 62b07664bb9a59ccf932463ecbe88630db3bd2d95807093af3aa3bf86d633a67
MD5 77cd6051c2b2a9d23d352a5cab7e4702
BLAKE2b-256 3c7c95c68e1aaee59b92f93c2b8af01ff76b297ab8af5e1d135bddd42f966ae7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for py_term_helpers-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 631d275e4f527d372e54aa2353b83b5f72d9e4458301fc9418f376fe8939f4a8
MD5 1a82f0ebdb3f6ffedc3daa2be98a7380
BLAKE2b-256 9598b2391d3ab04743c7c0624830b3c8c16187a55412b04aa7911dac483dc649

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