Coverage for pydantic_ai_jupyter / __init__.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.13.2, created at 2026-01-26 11:33 -0800

1"""Rich Jupyter display for pydantic-ai agents. 

2 

3This package provides live-updating displays for pydantic-ai agent runs 

4in Jupyter notebooks, including streaming text, tool calls, and results. 

5 

6Example: 

7 ```python 

8 from pydantic_ai import Agent 

9 from pydantic_ai_jupyter import run_with_display 

10 

11 agent = Agent("openai:gpt-4o-mini") 

12 

13 @agent.tool_plain 

14 def get_weather(city: str) -> str: 

15 return f"Sunny in {city}" 

16 

17 result = await run_with_display(agent, "What's the weather in Tokyo?") 

18 ``` 

19""" 

20 

21from .display import run_with_display 

22from .markdown import Markdown 

23from .views import ( 

24 DebugEventView, 

25 ErrorView, 

26 StreamingToolCallView, 

27 ThinkingView, 

28 ToolCallView, 

29 ToolResultView, 

30) 

31 

32__all__ = [ 

33 "run_with_display", 

34 "Markdown", 

35 "ToolCallView", 

36 "ToolResultView", 

37 "ErrorView", 

38 "ThinkingView", 

39 "DebugEventView", 

40 "StreamingToolCallView", 

41] 

42 

43__version__ = "0.1.0"