MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / run_python

Function run_python

bmtools/tools/python/api.py:52–57  ·  view source on GitHub ↗

Run python code in a REPL.

(query : str)

Source from the content-addressed store, hash-verified

50
51 @tool.get("/run_python")
52 def run_python(query : str):
53 '''Run python code in a REPL.
54 '''
55 if sanitize_input:
56 query = query.strip().strip("```")
57 return python_repl.run(query)
58
59
60 return tool

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected