Metadata-Version: 2.4
Name: llmtyped
Version: 0.0.1
Summary: Typed structured outputs from LLMs
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# llmtyped

```bash
uv add llmtyped
```

```python
from dataclasses import dataclass
from llmtyped import ask

@dataclass
class A:
    n: int
    scores: dict[str, int]

# Set OPENAI_API_KEY in your environment.
result: A = ask[A]("Give Alice and Bob scores from 1 to 10, and set n to their sum.")
print(result.n, result.scores)
```

```python
from llmtyped import Asker, AnthropicBackend

# Set ANTHROPIC_API_KEY in your environment.
claude = Asker(AnthropicBackend("claude-sonnet-4-5"))
result: A = claude[A]("Give Alice and Bob scores from 1 to 10, and set n to their sum.")
```
