Echo

The same old echo function from streamlit, but with an additional boolean parameter to control whether the output is shown or not. Intended to be paired with a checkbox, as shown on the example.

echo(code_location='above', show=True)

Whether to show the echoed code before or after the results of the executed code block. :param code_location: “above” or “below” :type lines: str :param show: Boolean to show or hide the code block :type lines: bool :return: None :rtype: none Copied and improved from Streamlit’s github

Interactive example: