Skip to content

Logging HTML#

Uploading a HTML file#

You can upload HTML as any other file to display it interactively in the Neptune app:


See example in Neptune 

Logging a HTML string object#

Create your HTML string and file:

html_str = (
    "<button type='button', style='background-color:#005879; width:400px; "
    "height:400px; font-size:30px'> <a style='color: #ccc', "
    "href=''>Take me back to the docs!<a> </button>"

with open("sample.html", "w") as f:

Using File.from_content(), upload the file to Neptune:

from neptune.types import File

run["html_obj"].upload(File.from_content(html_str, extension="html"))

See example in Neptune