I would like to print a string with sql into my jupyter notebook like below
This was done manually with pygments, see
Here is what I tried so far
from pygments import highlight
from pygments.lexers import SqlLexer
from pygments.formatters import HtmlFormatter
from IPython.core.display import HTML, display
query = '''
SELECT
*
FROM
latest.tmp
'''
display(HTML(highlight(query, SqlLexer(), HtmlFormatter())))
In the output keywords are neither green nor bold. (I am using Jupyterlab.)