Skip to main content

A toolkit with utility functions for various tasks.

Project description

Project Name

tUilKit

Description

tUilKit (formerly utilsbase) is a set of utility functions and dictionaries to aid in development projects.
The tUilKit package is composed of 3 primary components: - JSON /config folder for customization options - PYTHON /dict folder for dictionaries & constants - PYTHON /utils folder for the toolkit

Folder Structure

  • /src
    • /tests
      • /testLogs
      • test_output.py (Test functions from output.py)
    • /utilsbase
      • /config
        • BORDER_PATTERNS.json (Used in terminal/log output)
        • COLUMN_MAPPING.json (Used in smart_merging dataframes)
        • COLOURS.json (Foreground text COLOUR_KEY and RGB Reference)
        • GLOBAL_CONFIG.json (Folder Paths and Logging/Display Options)
        • config.py (Load configurations)
      • /dict
        • DICT_CODES.py (ANSI Escape Codes Parts for Sequencing)
        • DICT_COLOURS.py (RGB ANSI Escape Codes for Sequencing)
      • /utils
        • fs.py (Functions for File System Operations)
        • output.py (Printing/Debugging/Logging functions)
        • pdf.py (Functions to work with PDF files)
        • sheets.py (Functions to work with CSV, XLSX files)
        • formats.py (Not Developed - Functions to Format Cells, etc)
        • sql.py (Functions to work with SQL queries)
        • calc.py (Specialized use)
        • wallet.py (Specialized use)
        • data.py (Specialized use)

Installation

Follow these instructions to install and set up the project:

# Navigate to the project directory
cd utilsbase

# (Optional) Create and activate a virtual environment
# python -m venv venv
# source venv/bin/activate  # On Windows use `venv\Scripts\activate`

# Install dependencies
pip install -r requirements.txt

Usage

Provide examples of how to use your project.

# Example usage of py-tuilkit

Sample code in tests folder

def test_colour_log(log_file=None):
    test_message = ["RED","This is red,","GREEN","and this is green,","YELLOW","and this is yellow,","DATA","and this is data"]
    message = colour_fstr(*test_message)
    message_text = strip_ansi(message)
    colour_log(message, log_file=log_file)
    if log_file:
        with open(log_file, 'r') as log:
            logged_message = log.read().strip()
        assert message_text in logged_message, f"Expected %[{test_message}]% in logged message, but got %[{logged_message}]%"
    colour_log("PROC","test_colour_log", "DONE", "passed!", log_file=log_file)

Contributing

If you would like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

Contributing We’re actively seeking contributors to help enhance [Project Name]! Whether you’re passionate about terminal functionality, advanced data operations, or document creation, there’s plenty of room to leave your mark.

Areas for Contribution Here are some specific features we'd love to expand with your expertise:

Enhanced ANSI Sequences:

  • Add functionality for:
    • Fetching user keystrokes effectively.
    • Moving cursor dynamically within the terminal.
    • Applying background colours to text and extending feature to manipulate cursor positioning for advanced colouring tasks.

DataFrame / Spreadsheet Functionality:

  • Build out smarter tools, including:
    • Smart diff functionality to compare and highlight changes intelligently.
    • Smart merging for conflict resolution and seamless integration
    • Custom autoformatting that adapts to user-defined styles and standards.

LaTeX and PDF Functionality:

  • Incorporate capabilities for:
    • Reading and writing LaTeX to create professional-quality documents.
    • PDF manipulation, including generation, formatting, searching and editing.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • Thanks to everyone who contributed to this project.

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

tuilkit-0.1.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tuilkit-0.1.0-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file tuilkit-0.1.0.tar.gz.

File metadata

  • Download URL: tuilkit-0.1.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for tuilkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7ea357a1459958f99138c965195fb7e6cc4fdd5f1b134ed7c890d018f8ba92e0
MD5 d065ab996121d2af19a773ca5a45ada9
BLAKE2b-256 9f46f21d469d6152742760ab523ca1779636c079d77e570ab7877f258676a07c

See more details on using hashes here.

File details

Details for the file tuilkit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tuilkit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for tuilkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e85d8bfd889dab00f8b4e53fcb66b6c8028f1300fc00b84d7568c8f0aa9b2903
MD5 881e02935c2d1367009dbc6d47bfd04a
BLAKE2b-256 e4b1b114938463d2a133c6d312ee604e3a852e6e439a45eb1009faa846144e99

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