Skip to main content

A modular Python toolkit with JSON diff utilities and optional Textual and WBS helpers.

Reason this release was yanked:

migrats to another package

Project description

luvmagiToolKits

luvmagiToolKits is a modular Python toolkit.

The current public release includes:

  • json_diff: compare two JSON-serializable documents and write JSON or Markdown reports
  • decotextual: a decorator-driven helper layer for building small Textual-based tool panels quickly
  • wbs: WBS-oriented helpers that depend on the wbs extra

Installation

Install the lightweight base package:

pip install luvmagitoolkits

The base install is intended for dependency-light modules such as json_diff.

Install the Textual TUI helpers:

pip install "luvmagitoolkits[tui]"

Install the WBS helpers:

pip install "luvmagitoolkits[wbs]"

Install every optional dependency:

pip install "luvmagitoolkits[all]"

Upgrade the package:

pip install -U luvmagitoolkits

What json_diff Provides

  • Structured diffs for dictionaries, lists, and nested JSON-like payloads.
  • Configurable array matching by key, inferred key, hash, or index.
  • JSON and Markdown output writers with explicit encoding parameters.

What decotextual Provides

  • A class decorator to register tools into a navigable tree.
  • A method decorator to define labels, descriptions, and placeholders.
  • A simple Linear(...) helper for select-style choices.
  • A ready-to-run Textual application launcher with run_tui().

run_tui() requires the tui extra.

Quick Start

from pathlib import Path

from luvmagitoolkits.decotextual import Linear, register_tool, run_tui, tool_method


@register_tool(category="File Tools", tool_name="File Utilities")
class FileTool:
    @tool_method(
        name="Read File",
        description="Read a file and return the first N lines",
        placeholders={
            "file_path": "Full path, e.g. ./demo.txt",
            "tags": "One tag per line, or comma-separated",
        },
    )
    def read_file(self, file_path: Path, line_count: int = 20, tags: list | None = None):
        print(f"Reading {file_path} - first {line_count} lines")
        if tags:
            print(f"Tags: {tags}")
        return "Done"

    @tool_method(
        name="Batch Rename",
        description="Batch rename files in a directory",
        placeholders={"directory": "Target directory path"},
    )
    def batch_rename(
        self,
        directory: Path,
        prefix: str = "file_",
        mode: Linear = Linear("Sequential", "Timestamp", "MD5"),
    ):
        print(f"Scanning: {directory}")
        print(f"Prefix: {prefix}, Mode: {mode}")
        return "Rename complete"


if __name__ == "__main__":
    run_tui()

Release Status

  • Package version: 0.1.1
  • Stability: alpha
  • Recommended audience: early adopters and internal experimentation

Roadmap

  • Expand the decotextual examples and tests.
  • Add module-specific documentation under docs/.
  • Gradually fill in the database, dataframe, excel, image, and utils modules.

Project Links

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

luvmagitoolkits-0.1.2.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

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

luvmagitoolkits-0.1.2-py3-none-any.whl (35.0 kB view details)

Uploaded Python 3

File details

Details for the file luvmagitoolkits-0.1.2.tar.gz.

File metadata

  • Download URL: luvmagitoolkits-0.1.2.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for luvmagitoolkits-0.1.2.tar.gz
Algorithm Hash digest
SHA256 aa6f89f04e8d07e4125d4e49dadbb1d6b22f6deffba82a789d8519f63aefd3a7
MD5 5ca333bba2fef428cf0e487cea63887c
BLAKE2b-256 48a343bffcdfeb756afa3f327ee0412641de0b0e6fced7480d49815a20821e53

See more details on using hashes here.

File details

Details for the file luvmagitoolkits-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for luvmagitoolkits-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9f043dad703b15f1f2d9825a68a614bbadc831dfabc527603231f854441fc1bd
MD5 a6236e7198ee9d33641fe314245b79b0
BLAKE2b-256 e33b11a5f9ee6e4a94b8ab443a39e935a39b8aa8bce5d4325232453aad6d4742

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