Skip to content Notes

For full documentation visit

One-time Setup

Before using, follow these steps:

  1. Sign up and create a account. Notice that you can click on the github logo and use your GitHub credentials to sign up.

  2. Create your credentials file:

pip install plotly
>>> import plotly
>>>'YourName', api_key='YourKey')

This will create a ~/.plotly/.credentials file.

3) You will be using streams, so create some streaming API tokens here. You should create 3 to start.

4) Manually add the newly created streaming API tokens to ~/.plotly/.credentials :

    "username": "YourName",
    "stream_ids": [
    "api_key": "YourKey",
    "proxy_username": "",
    "proxy_password": ""

Python API

Once your streaming API tokens are added, you can use them in your code without a hard-coded reference:

import plotly.plotly as py
import as tls

stream_ids = tls.get_credentials_file()['stream_ids']
# Use the first streaming API token
stream_id = stream_ids[0]
stream = py.Stream(stream_id)