Accessing stream via google colab

Hello Murat,

I noticed that you have used the wrapper.get_client() method in your code. Just to let you know, the StreamWrapper provides some useful tools to manage URLs and obtain authenticated clients and transports using your local account. Since you are working in Google Colab, I suggest that you modify your code as follows:

from specklepy.api.wrapper import StreamWrapper
from specklepy.api.client import SpeckleClient
from specklepy.api.credentials import get_account_from_token

wrapper = StreamWrapper("https://speckle.xyz/streams/b573f65f0b")
client = SpeckleClient()
account = get_account_from_token(SPECKLE_TOKEN, wrapper.server_url)
client.authenticate_with_account(account)

I’m still using the wrapper class to get the server address from the given URL. After modifying your code, what happens when you run the following:

client.stream.list()

It should list all the projects associated with your account.

1 Like