List projects with specklepy

Before specklepy 2.20.0 I could call

client: SpeckleClient = ...
list_of_streams = client.stream.list()

to return a list of available streams.

Starting with specklepy 2.20.0 this throws a warning, since the FE1 API is deprecated.

With the current API, I was expecting to be able to call e.g. client.project.list() to obtain the same, but the ProjectResource does not have the .list method implemented.

Is there a way to get a list of projects without using the client.server.make_request method?

1 Like

Please see client.active_user.get_projects
This should be an appropreate equivalent to the old stream.list

We’ve tried to match the SpeckleClient functions closer to the graphql queries.
In this case, you’re fetching the projects available to the active user.

Please let me know if there’s any other functionality you’re missing from the new functions.

1 Like

Thanks @Jedd. Perfect :smiley:

I like that the API is matching the gql queries.

2 Likes