Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devinci-it/python-cor
https://github.com/devinci-it/python-cor
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/devinci-it/python-cor
- Owner: devinci-it
- License: mit
- Created: 2024-08-01T18:56:17.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-01T19:09:52.000Z (3 months ago)
- Last Synced: 2024-08-01T21:35:13.920Z (3 months ago)
- Language: Python
- Size: 123 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Utility Package for Terminal-Based Applications
## Overview
This Python package provides a collection of utility functions and classes designed to simplify terminal-based interactions and formatting. It offers tools to manage terminal output, handle user interactions, and apply text styling.
## Features
- **Terminal Management**: Clear screens, retrieve terminal dimensions, and adjust terminal size.
- **Text Formatting**: Print styled messages, headers, and dividers with uniform formatting.
- **User Interaction**: Prompt for user input, display key-value pairs, and wait for user actions.
- **Styling**: Apply various text styles and colors to enhance readability and presentation.## Installation
Clone the repository and include it in your Python project. No additional installation is required.
## Usage
Here’s a brief example of using the utilities:
```python
from src.terminal_utils import clear_screen, get_terminal_size
from src.formatting import line, header
from src.user_interaction import prompt_for_input# Clear the terminal screen
clear_screen()# Print a header
header("Welcome to the Utility Package")# Prompt for user input
user_name = prompt_for_input("Enter your name:", str)# Print a formatted line
line(f"Hello, {user_name}", type="success")
```## Directory Structure
```
.
├── LICENSE
├── MANIFEST
├── README.md
├── script.sh
└── src
├── display.py
├── formatting.py
├── __init__.py
├── screen.py
├── styles.py
├── terminal_handler.py
├── terminal_utils.py
└── user_interaction.py
```## Core Goal
The primary aim of this package is to provide a clean and minimalistic foundation for terminal-based applications. By centralizing and standardizing core functionalities, this package promotes consistency and efficiency, reducing redundancy and ensuring a polished, uniform look for your terminal applications.
## License
This project is licensed under the terms of the [MIT License](LICENSE).
## Author
- **Vincent de Torres** - [GitHub Profile](https://github.com/devinci-it)
For more details and examples, refer to the source code and inline documentation in the `src` directory.
---