MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / format_output

Function format_output

src/ifcquery/ifcquery/__main__.py:57–64  ·  view source on GitHub ↗
(data, fmt: str)

Source from the content-addressed store, hash-verified

55
56
57def format_output(data, fmt: str) -> str:
58 if fmt == "json":
59 return json.dumps(data, indent=2, ensure_ascii=False)
60 elif fmt == "text":
61 return _format_text(data)
62 elif fmt == "ids":
63 return _format_ids(data)
64 return json.dumps(data, indent=2, ensure_ascii=False)
65
66
67def _format_ids(data) -> str:

Callers 1

mainFunction · 0.70

Calls 2

_format_idsFunction · 0.85
_format_textFunction · 0.70

Tested by

no test coverage detected