Skip to main content

A modular Python toolkit with a decorator-driven Textual TUI framework.

Reason this release was yanked:

migrats to another package

Project description

luvmagiToolKits

luvmagiToolKits is a modular Python toolkit. The first release focuses on decotextual, a decorator-driven helper layer for building small Textual-based tool panels quickly.

The repository also contains placeholder modules for future toolkit areas such as database, dataframe, excel, image, and general utilities. At the current stage, decotextual is the production-ready part of the package.

Installation

Install the base package:

pip install luvmagitoolkits

Install the Textual runtime if you want to launch the TUI:

pip install "luvmagitoolkits[tui]"

Install every optional dependency:

pip install "luvmagitoolkits[all]"

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().

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.0
  • 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.0.tar.gz (9.4 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.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: luvmagitoolkits-0.1.0.tar.gz
  • Upload date:
  • Size: 9.4 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.0.tar.gz
Algorithm Hash digest
SHA256 339591e06a68d37f12db2fe3333eb465e348763e2171bb2811adab84a73a6e21
MD5 1a7399353443f503eb3540a14aa48696
BLAKE2b-256 f1bc1d62b674beb73af7b87d62a4afc40c4fbb9693c2184289aba1a2ccfe54a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for luvmagitoolkits-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a019c488047d63529823b9aa7dc3d7933f9dd2c910c25877f882bd78f6cf3f46
MD5 b4b87d36655d7bf168c67f67b69c6b95
BLAKE2b-256 763eb064abfc69f63195654b11b9506a18fcad3ffc0d53f7f21255297dc6290c

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