Skip to content

API Reference parrot_tools.interfaces.workday.utils.utils

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.interfaces.workday.utils.utils

View source

Function ensure_list

Convert a potentially singular value to a list.

ensure_list(val: Any) -> List

Parameter Type Default Description
val Any

Returns: List

Function extract_by_type

Given a list of {'_value_1':…, 'type':…} dicts (or a single dict), return the value whose type matches desired_type, or None.

extract_by_type(ids: Any, desired_type: str) -> Optional[str]

Parameter Type Default Description
ids Any
desired_type str

Returns: Optional[str]

Function extract_nested

Helper to extract nested data from a dict given a list of keys.

extract_nested(data: Dict[str, Any], path: list) -> Any

Parameter Type Default Description
data Dict[str, Any]
path list

Returns: Any

Function first

Helper to get first item of a list or dict, or empty dict if neither.

first(v: Any) -> Dict[str, Any]

Parameter Type Default Description
v Any

Returns: Dict[str, Any]

Function safe_serialize

Serialize Decimal, list or dict into JSON-friendly string, or return empty string if None.

safe_serialize(val: Any) -> str

Parameter Type Default Description
val Any

Returns: str

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally