File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff 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 ) _
You can’t perform that action at this time.
0 commit comments