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.1.tar.gz (22.6 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.1-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tuilkit-0.1.1.tar.gz
  • Upload date:
  • Size: 22.6 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.1.tar.gz
Algorithm Hash digest
SHA256 6998aa6e15d7a07ebda388b41d74b94fe48b75a72625c23d35b7574063649732
MD5 a473cd48dad1e819870d1ebf3deff410
BLAKE2b-256 7ab0e589061c7db7e901e1ccc471597b35166694c472967331cf0bb0a7b5a57c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tuilkit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b85a9e2af17d42a4028adeb5ad9eb893ca6f48a6779447bf91a9357f632ad3d
MD5 f1725c48bd61a7d2287c1c39698e7ada
BLAKE2b-256 ff03e0c2c5e9802370f0a8c28969dcb78f63eb65ec76052bb1b3e97afeacdff2

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