Stream/Branch/Commit API is now deprecated, Use the new Project/Model/Version API functions in Client

Hi, I am a student working on the integration of schedules with 3D models of built assets. I am new to Speckle, and to start with, I am going through some of the tutorials on the creation of the Speckle app using Python. This tutorial to be precise is ____Create Your First Speckle App using only Python 🐍

The following which uses “streams” seems to be outdated likewise “branches” and “commits”

#-------
#Streams List👇
streams = client.stream.list()

DeprecationWarning: Call to deprecated method list. (Stream/Branch/Commit API is now deprecated, Use the new Project/Model/Version API functions in Client}) -- Deprecated since version 2.20.

Hi @Michael_Awe,
Thanks for raising the out of date tutorial to our attention. We are still yet to update several parts of our docs and tutorials to reflect the new API.

The old streams, stream, branch, commit API has been marked deprecated all across our API and SDKs, but they still work, and we don’t have any plans to break them just yet…
However, we may choose to eventually remove the functions in the next major version of SpecklePy.

For now, these warnings just as a friendly notice to point users in the direction of the newer project, model, version API, which we now recommend you upgrade to if you care about the new the features and long term support the new API offers.


If you do choose to use the newer functions, hopefully most of the functions have a clear replacement to anyone who’s familiar with the The Great Rename.
client.stream.createclient.project.create
client.branch.updateclient.model.update
client.commit.getclient.version.get
etc…

There are a couple no-so-obvious ones, so don’t hesitate to ask if you run into any troubles.

client.stream.listclient.active_user.get_projects
client.stream.searchclient.active_user.get_projects with a UserProjectsFilter
client.stream.inviteclient.project_invite.create

1 Like

Hi Jed, Thanks for your quick and simplified reply.

With the following

projects = client.active_user.get_projects
st.write(“Projects:”, projects)

I am hoping to print a list of projects in my dash, but it only outputs ------>>>> (what do you suggest could be the issue here?):

methodspecklepy.api.resources.current.active_user_resource.ActiveUserResource.get_projects(*, limit: int = 25, cursor: Optional[str] = None, filter: Optional[specklepy.core.api.inputs.user_inputs.UserProjectsFilter] = None) → specklepy.core.api.models.current.ResourceCollection[Project]

@Michael_Awe just to check, are you actually calling the method?

Notice the parentheses () after get_projects. This is necessary to invoke the method and retrieve the project data.

1 Like

all sorted. Thanks