Closed
Description
It would be better to have an example/explanation regarding how to create magic urls from private links with share_key
and use for sending email-reports
For example:
Something like this:
from IPython.display import display, HTML
template = (''
'<a href="{graph_url}" target="_blank">' # Open the interactive graph when you click on the image
'<img src="{graph_url}">' # Use the ".png" magic url so that the latest, most-up-to-date image is included
'</a>'
'{caption}' # Optional caption to include below the graph
'<br>' # Line break
'<a href="{graph_url}" style="color: rgb(190,190,190); text-decoration: none; font-weight: 200;" target="_blank">'
'Click to comment and see the interactive graph' # Direct readers to Plotly for commenting, interactive graph
'</a>'
'<br>'
'<hr>' # horizontal line
'')
email_body = ''
graph = 'https://plot.ly/~chelsea_lyn/17461.png?share_key=3kCBg9awEny15vobuAP5Up'
_ = template
_ = _.format(graph_url=graph, caption='')
email_body += _
display(HTML(email_body))