Skip to content

v0.1.0 (beta)

Pre-release
Pre-release

Choose a tag to compare

@Eltarras Eltarras released this 03 Oct 11:49
· 181 commits to main since this 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 type
  • thunc.call(...): string prompts for instructions built in code
  • Typed, validated results (bool, int, Literal, list, dict, dataclasses, T | None) with automatic retries and ensure= checks
  • thunc.map for 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.