Metadata-Version: 2.4
Name: hugpy-tools
Version: 0.2.27
Summary: Hugpy tools: a slim, stdlib-only capability suite for autonomous agents (safe file/path ops, text chunking and diffing, hashing, structured-data read/write, and urllib+html.parser webpage assessment)
Author-email: putkoff <support@hugpy.ai>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://hugpy.ai
Project-URL: Documentation, https://hugpy.ai/docs
Project-URL: Downloads, https://hugpy.ai/downloads/
Keywords: hugpy,agent,tools,filesystem,webpage,assessment
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: abstract_essentials>=0.0.0.33
Requires-Dist: abstract_search
Requires-Dist: abstract_utilities>=0.2.2.812
Requires-Dist: abstract_webtools[scrape]>=0.1.6.438
Requires-Dist: hugpy-resources<0.2,>=0.1.2.8
Provides-Extra: toml
Requires-Dist: tomli; python_version < "3.11" and extra == "toml"
Provides-Extra: yaml
Requires-Dist: PyYAML; extra == "yaml"
Provides-Extra: render
Requires-Dist: playwright; extra == "render"
Provides-Extra: images
Requires-Dist: Pillow; extra == "images"
Provides-Extra: vision
Requires-Dist: Pillow; extra == "vision"
Requires-Dist: pytesseract; extra == "vision"
Requires-Dist: numpy; extra == "vision"
Requires-Dist: opencv-python-headless; extra == "vision"
Provides-Extra: documents
Requires-Dist: media_intelligence[documents]<0.3,>=0.1.3; extra == "documents"
Provides-Extra: media
Requires-Dist: hugpy-tools[documents]; extra == "media"
Provides-Extra: desktop
Requires-Dist: abstract_clicks; extra == "desktop"
Requires-Dist: abstract_windows; extra == "desktop"
Requires-Dist: Pillow; extra == "desktop"
Requires-Dist: pytesseract; extra == "desktop"
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Requires-Dist: pytest-timeout; extra == "test"
Dynamic: license-file

# hugpy-tools

Hugpy Tools exposes portable operations for text, files, structured data and web content. An application can discover their input schemas and call them locally from Python or the command line.

## Installation

Install optional backends only for the capabilities you use. Examples include `documents`, `images`, `render` and `media`.

```sh
python -m pip install hugpy-tools
```

## Quick start

List the tools, then call the token estimator with a JSON argument.

```sh
hugpy-tools list
hugpy-tools call text_estimate_tokens --arguments '{"text":"hello world"}'
```

The estimator reports an approximation. Use the schema returned by `list` to inspect the inputs for a particular tool.

## Python API

```python
from hugpy_tools import call_tool, list_tools

schemas = list_tools()
result = call_tool("text_estimate_tokens", {"text": "hello world"})
```

`get_toolset()` returns the category-to-callable mapping used by hosts. `hugpy-tools list --optional` includes optional tools, and `call --optional` enables their lookup. The CLI accepts `--arguments -` to read a JSON object from standard input.

## Hosted use

Abstract Toolserver adds transport, authentication and persistent host services around these operations. Local callers can use Hugpy Tools directly. Shared parsing, file inspection and sizing functions come from Hugpy Resources.

For code that needs the registry rather than a single result, `get_toolset()` returns fresh category mappings. To expose only a subset of tools, select those callables or schemas before adding them to the host application. Optional integrations keep their own dependency and runtime requirements.
