e04ed9c211
CF: Deploy Dev Docs / deploy (push) Has been cancelled
Sync Labels / build (push) Has been cancelled
tests / unit tests (macos-latest) (push) Has been cancelled
tests / unit tests (windows-latest) (push) Has been cancelled
tests / unit tests (ubuntu-latest) (push) Has been cancelled
19 lines
510 B
Python
19 lines
510 B
Python
import asyncio
|
|
from toolbox_core import ToolboxClient
|
|
|
|
|
|
async def main():
|
|
# Replace with the actual URL where your Toolbox service is running
|
|
async with ToolboxClient("http://127.0.0.1:5000") as toolbox:
|
|
tool = await toolbox.load_tool("execute_sql")
|
|
result = await tool("SELECT 1")
|
|
print(result)
|
|
|
|
tool = await toolbox.load_tool("list_tables")
|
|
result = await tool(table_names="DIM_DATE")
|
|
print(result)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|