`specklepy.core.api` vs `specklepy.api`

What’s the point of having a specklepy.core.api and specklepy.api module?

Many specklepy.api classes - e.g. specklepy.api.client.SpeckleClient - inherit from speckle.core.api.

So I assumed that I should use specklepy.api, because I thought that specklepy.api is one abstraction level higher than specklepy.core.api, but then the QGIS connector only uses the specklepy.core.api module, e.g. speckle-qgis/speckle_qgis.py at 16affa52b4a1c10a21afb20ec134378e22047418 · specklesystems/speckle-qgis · GitHub.

So which should I use?

Hi @JoostGevaert ! You are correct: specklepy.api is the right one to use, as it inherits basics from .core, and implements the default behavior for connectors/SDK. QGIS connector implements different behavior by choice, but unless you have strong reason to change specklepy.api behavior, no need to go through extra work :raised_hands:

3 Likes