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
- Prints terminal wide
-
.center_string_stars(string, char="*") :
- Prints the
stringin the center of terminal widechar
- Prints the
-
.term_wrap(string, char="*") :
- Prints the
stringin the center of terminal widecharwith 2.star_lineabove and below - Essentially:
.star_line() => .center_string_stars() => .star_line()
- Prints the
-
.top_wrap(string, char="*"*) :
- Clears console and runs
.term_wrap()
- Clears console and runs
-
.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
-
Installation:
pip install py-term-helpers
-
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7dcdc156fbd6cee08936c10afbc32931d5c8ab427d25b9567e659876f095820
|
|
| MD5 |
c8cc82eb06b7e12152570afd9c1090a4
|
|
| BLAKE2b-256 |
156127acd0b16a846b539c2abef09122b013ec93f2c235be9057e6d09dba742d
|
File details
Details for the file py_term_helpers-0.0.6-py3-none-any.whl.
File metadata
- Download URL: py_term_helpers-0.0.6-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbbc22e3bc114e4eaa1a3d9f4d958700885c7b01fd356cdf8db07d928864a886
|
|
| MD5 |
b436acbf07855050888a0453ae7bcd2b
|
|
| BLAKE2b-256 |
9c548ff981884df52a86ff7fa17af6e7587de68237e9c2f596036106342f1eba
|