Repository navigation
v0.1.0 (beta)
Pre-release
Pre-release
First public beta of thunc (think + function): call an LLM like a typed Python function.
pip install thunc@thunc.function: the docstring is the prompt, the parameters are the inputs, the return annotation is the output typethunc.call(...): string prompts for instructions built in code- Typed, validated results (
bool,int,Literal,list,dict, dataclasses,T | None) with automatic retries andensure=checks thunc.mapfor parallel calls, plus optional JSONL tracing- Backends: the Claude API, plus your local Claude Code or Codex login for cheap testing
- Standard library only, Python 3.10+
This is a beta: expect bugs, and the API may change. Issues and feedback are very welcome.