No project description provided
Project description
termprint
Table of Contents
Installation
pipx install termprint
License
termprint is distributed under the terms of the MIT license.
Functions Documentation
set_color_scheme
Set the color scheme for printing. Options are: 'truecolor', '256colors', 'basic', 'mono'.
Args:
- scheme (str): The name of the color scheme to set. If the scheme is not found, it defaults to 'basic'
error
Print an error message in the color defined by the current color scheme.
Args:
- msg (str): The error message to print
warning
Print a warning message in the color defined by the current color scheme.
Args:
- msg (str): The warning message to print
info
Print an informational message in the color defined by the current color scheme.
Args:
- info (str): The main informational message to print.
- msg (str, optional): An additional message to print in a different color
line
Print a line of a specified length and character in the color defined by the current color scheme.
Args:
- length (int, optional): The length of the line. Defaults to 80.
- char (str, optional): The character to use for the line. Defaults to '─'
title
Print a title message in the color defined by the current color scheme.
Args:
- msg (str): The title message to print.
- length (int, optional): The length of the title line. Defaults to 80.
- line (bool, optional): Whether to print a line under the title. Defaults to True.
- char (str, optional): The character to use for the line. Defaults to '─'
bullet_list
Print a bullet list of items in the color defined by the current color scheme.
Args:
- items (list): A list of items to print as a bullet list.
- title (str, optional): The title of the bullet list. Defaults to Non
dict2tree
Convert a dictionary to a tree structure.
Args:
- data (dict): The dictionary to convert to a tree.
- tree (rTree): The tree object to add the dictionary to.
- level (int, optional): The level of the tree. Defaults to 1.
- title (str, optional): The title of the tree. Defaults to "Tree"
tree
Print a tree representation of a nested dictionary.
Args:
- data_dict (dict): The nested dictionary to be represented as a tree.
- title (str, optional): The title of the tree. If not provided, the title will be the key of the single item in the dictionary,
- or 'root' if the dictionary has multiple items.
Returns:
- Non
print_tree
Print a tree representation of a nested dictionary with a specified root name.
Args:
- tree (dict): The nested dictionary to be represented as a tree.
- name (str, optional): The name of the root of the tree. Defaults to 'root'.
Returns:
- Non
table
Prints a table with the given columns and lists.
Args:
- columns (list): A list of column names.
- lists (list): A list of lists representing the rows of the table.
- title (str, optional): The title of the table. Defaults to 'Lists'.
- max_rows (int, optional): The maximum number of rows to display. Defaults to MAX_ROWS.
Returns:
- Non
dictionary
Prints a dictionary in a tabular format.
Args:
- data (dict): The dictionary to be printed.
- title (str, optional): The title of the table. Defaults to 'Dictionary'.
- columns (list, optional): The column names for the table. Defaults to ['Key', 'Value'].
- max_rows (int, optional): The maximum number of rows to be displayed. Defaults to MAX_ROWS.
Returns:
- Non
listdicts
Prints a list of dictionaries in a tabular format.
Args:
- data (list): A list of dictionaries to be printed.
- title (str, optional): The title of the table. Defaults to 'Dictionaries'.
- columns (list, optional): The column names of the table. Defaults to ['Key', 'Value'].
- max_rows (int, optional): The maximum number of rows to be displayed. Defaults to MAX_ROWS.
Returns:
- Non
delta_schema
Prints the schema of a delta table.
Args:
- delta_table: The delta table object.
Returns:
- Non
delta_metadata
Prints the metadata information of a delta sharing dataset in a formatted table.
Args:
- version (str): The version of the metadata.
- metadata (object): The metadata object containing information like name, description, id, partition columns, created time, and configuration.
Returns:
- Non
delta_history
Display the delta history of a delta sharing dataset in a table format.
Args:
- history (dict): A dictionary containing the delta history.
Returns:
- Non
print_share_metadata
Print the share metadata information of a delta sharing dataset.
Args:
- table_path (str): The path of the table.
- metadata (dict): The metadata dictionary containing information about the table.
Returns:
- Non
print_ds_metadata
Prints the metadata and schema information of a delta sharing dataset.
Args:
- table_path (str): The path of the dataset table.
- metadata (dict): The metadata dictionary containing information about the dataset.
Returns:
- Non
print_request_info
Print the request information in a formatted table.
Args:
- method (str): The HTTP method of the request.
- endpoint (str): The endpoint of the request.
- path (str): The resource path of the request.
- headers (dict): The headers of the request.
- params (dict, optional): The parameters of the request. Defaults to {}.
- data (dict, optional): The data of the request. Defaults to {}.
Returns:
- Non
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 termprint-0.0.5.tar.gz.
File metadata
- Download URL: termprint-0.0.5.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.24.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e021546102c5e504ca0e19f4a81bab48623d513f91578c20dade3229c7df2f62
|
|
| MD5 |
c85586c111d9834a0854e0988a60c071
|
|
| BLAKE2b-256 |
9d62c5a41ab7450461419aa1c2a04e13f9cda94cd893b5ff00f8ceaa4b8eea2a
|
File details
Details for the file termprint-0.0.5-py3-none-any.whl.
File metadata
- Download URL: termprint-0.0.5-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.24.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e4cb22ecdc86c513f654df496dae0ad48cb6bd655c11f4c370be07140c19adf
|
|
| MD5 |
db765c9b4b5cdef2fdd0a7a878f60b8d
|
|
| BLAKE2b-256 |
9a363d2341541945533a9481d9d24c3108aeb2ce02f1b16c2d3881d550f58933
|