diff --git a/examples/session_relevance_from_file_json.py b/examples/session_relevance_from_file_json.py index 8b91037..c0ddb78 100644 --- a/examples/session_relevance_from_file_json.py +++ b/examples/session_relevance_from_file_json.py @@ -5,6 +5,7 @@ requires `besapi`, install with command `pip install besapi` """ + import json import besapi @@ -23,13 +24,15 @@ def main(): result = bes_conn.post(bes_conn.url("query"), data) - print(result) + if __debug__: + print(result) json_result = json.loads(str(result)) json_string = json.dumps(json_result, indent=2) - print(json_string) + if __debug__: + print(json_string) with open( "examples/session_relevance_query_from_file_output.json", "w"