Temporarily changing core, tdk, and serve versions to 1.0.0 so that my workflow will detect a change to the pyproject.toml version later |
||
|---|---|---|
| .. | ||
| arcade_tdk | ||
| pyproject.toml | ||
| README.md | ||
Arcade TDK (Toolkit Development Kit)
Toolkit Development Kit for building and testing Arcade tools.
Overview
Arcade TDK provides the essential tools and utilities for building Arcade tools:
- Tool Decorator: Simple
@tooldecorator for creating Arcade tools - Authentication: Auth providers and helpers for tool security
- Annotations: Type annotations and parameter validation
- Core Integration: Seamless integration with arcade-core components
Installation
pip install arcade-tdk
Usage
from typing import Annotated
from arcade_tdk import tool
@tool
def hello_world(name: Annotated[str, "The name of the person to greet"]) -> str:
"""Say hello to someone."""
return f"Hello, {name}!"
# The tool is automatically registered and available for use
Advanced Usage
from typing import Annotated
from arcade_tdk import tool, ToolCatalog, Toolkit
# Create tools with more complex parameters
@tool
def calculate_sum(numbers: Annotated[list[float], "The numbers to sum"]) -> float:
"""Calculate the sum of a list of numbers."""
return sum(numbers)
# Access the tool catalog
catalog = ToolCatalog()
tools = catalog.get_all_tools()
# Work with toolkits
toolkit = Toolkit.from_directory("my_toolkit")
License
MIT License - see LICENSE file for details.