Skip to content

Commit 1ba30d6

Browse files
CopilotBlackDadd77
andcommitted
Update README with new client entry points
Co-authored-by: BlackDadd77 <179016248+BlackDadd77@users.noreply.github.com>
1 parent 29b7d4f commit 1ba30d6

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,8 +2005,13 @@ async def list_all_resources() -> None:
20052005
print(f"Total resources: {len(all_resources)}")
20062006

20072007

2008-
if __name__ == "__main__":
2008+
def main():
2009+
"""Entry point for the pagination client."""
20092010
asyncio.run(list_all_resources())
2011+
2012+
2013+
if __name__ == "__main__":
2014+
main()
20102015
```
20112016

20122017
_Full example: [examples/snippets/clients/pagination_client.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/clients/pagination_client.py)_
@@ -2146,8 +2151,13 @@ async def main():
21462151
print(f"Available tools: {[tool.name for tool in tools.tools]}")
21472152

21482153

2149-
if __name__ == "__main__":
2154+
def run():
2155+
"""Entry point for the streamable basic client."""
21502156
asyncio.run(main())
2157+
2158+
2159+
if __name__ == "__main__":
2160+
run()
21512161
```
21522162

21532163
_Full example: [examples/snippets/clients/streamable_basic.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/clients/streamable_basic.py)_

0 commit comments

Comments
 (0)