Plotly.tools.set_credentials_file

Am exploring functionality in plotly for a project and want to set the credentials for the server.
However, the following code wouldn’t work:

import plotly
plotly.tools.set_credentials_file(username=’YourAccountName’, api_key=’YourAPIKey’)

ttributeError: module ‘plotly.tools’ has no attribute ‘set_credentials_file’

The ‘set_credentials’ method no longer seems to be available.
Has anything changed?

Starting in plotly version 4.0, all Chart Studio related functionality has been moved to the chart_studio library. You can read more about the change in the v4 migration guide and our getting started with chart-studio doc.