Tool-parse

Latest version: v1.1.3

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

0.2.1

What's new?

- Minimum python version updated to 3.10 (I'm still new at this CI/CD stuff + testing on python 3.8 & 3.9 is difficult for now as it would need rewrite/major update to support them. Sorry for messing up.)
- Added CI/CD pipeline, ruff formatting, linting and code coverage
- Resolved minor bugs

**Full Changelog**: https://github.com/synacktraa/tool-parse/compare/v0.2.0...0.2.1

0.2.0

What's New?

- Added support for optional parameters: `typing.Optional[<type>]`/`t.Union[<type>, None]`/`<type> | None`
- Added support for compiling call expression in Independent tools
- Resolve minor bugs

PyPI URL: https://pypi.org/project/tool-parse/0.2.0/

0.0.1

Excited to announce the initial release of tool-parse, a Python library designed to simplify LLM tool-calling!

🚀 What's New

- Replaces hypertion package which only supported regular functions
- Supports function registration (both synchronous and asynchronous)
- Compatible with `pydantic.BaseModel`, `typing.TypedDict`, and `typing.NamedTuple`
- Multiple ways to register tools: decorators, direct passing, and key-value pairs
- Schema generation in 'base' and 'claude' formats
- Tool invocation from call expressions or metadata
- Registry combination functionality

🔧 Installation


pip install tool-parse


🌟 Key Features

- Easy tool registration with optional docstring support
- Flexible schema generation for different LLM providers
- Simple tool invocation
- Support for various parameter types
- Registry combination for organizing tools

📚 Quick Start

python
from tool_parse import ToolRegistry

tr = ToolRegistry()

tr.register
def search_function(query: str, max_results: int = 10):
"""
Search the web for given query
:param query: The search query string
:param max_results: Maximum number of results to return
"""
...

Generate schema
tools = tr.marshal('base')

Invoke tool
result = tr.compile('search_function("Python programming", max_results=5)')


For more detailed usage examples and documentation, please refer to our [README](https://github.com/synacktraa/tool-parse#readme).

🤝 Contributing

contributions, issues, and feature requests are welcome! Feel free to check our [issues page](https://github.com/synacktraa/tool-parse/issues).

---

Thank you for your interest in tool-parse. Looking forward to seeing how you'll use it in your projects!

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.