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

Function print_tablefile

bmtools/tools/meta_analysis/api.py:531–541  ·  view source on GitHub ↗

given the table file path that are required to display, this tool reads the file and returns the string of the table.

( table_path: str )

Source from the content-addressed store, hash-verified

529
530 @tool.get('/print_tablefile')
531 def print_tablefile( table_path: str ):
532 """
533 given the table file path that are required to display, this tool reads the file and returns the string of the table.
534 """
535 try:
536 con = open(table_path).read()
537 except Exception as e:
538 js = {'error': 'cannot open the table file!'}
539 return js
540 js = {'table string': con}
541 return js
542
543
544 return tool

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected