How to Authenticate

from utils.rc.client.requests import Requests
from utils.rc.client.auth import AuthClient

import logging
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)

Using a Token

You can find your access token when you login to the web interface. Go to: https://staging.dev.rapidcanvas.net/#/token. You can also copy the tenant token from the Tenant management page of the UI.

#Requests.setRootHost("http://staging.dev.rapidcanvas.net/api/")
AuthClient.setToken(token="")

Using login credentials

Currently, you can directly navigate to the Notebook page from the UI without passing any credentials. However, if you launch the Notebook from the local system, then you have to use this authentication method.

Requests.setRootHost("http://staging.dev.rapidcanvas.net/api/")
AuthClient.setToken(email="", password="")  #credentials you use to login to RapidCanvas UI