Skip to content

Speckle

Speckle is an open-source interoperability platform, that facilitates seamless exchange of data between different software packages. Speckle is the core of the DataFusr platform, on which proprietary Haskoning extensions are build.

Getting started

Access the Haskoning Speckle server and sign in with your Haskoning account. Speckle connectors for your software can be downloaded from the server page.

Speckle provides the web-server and database where the data is stored in the form of 'Streams', a web-portal through which these streams can be viewed and managed and a set of software-plugins, or connectors, that allow you to send streams to and from your software to the web-server.

Python

To assist with sending and receiving in Python, the DataFusr team provides a Speckle client. It makes sending and receiving streams very easy. Use the following commands to install the package in your virtual environment:

bash
pip install artifacts-keyring
pip install datafusr-speckle --extra-index-url=https://corporateroot.pkgs.visualstudio.com/_packaging/datafusr/pypi/simple/

Note that you will be prompted to login with your haskoning account.

The most straightforward way to fetch data from a stream is by specifying the stream url.

py
from datafusr_speckle import SpeckleReceiver

receiver = SpeckleReceiver.from_url("https://app.speckle.systems/workspaces/haskoning/streams/26556f8645/commits/64e89b27ea")
info, speckle_object = receiver.execute()
info.print()

The execute method returns a tuple with two objects. The first object stores some information about the transaction. The second object is the actual Speckle object that has all the data in the stream.

Sending can be done in a similar way.

py
from datafusr_speckle import SpeckleSender

sender = SpeckleSender.from_url("https://app.speckle.systems/workspaces/haskoning/streams/26556f8645/branches/datafusr_speckle")
info = sender.execute(speckle_object)
info.print()

Note that the speckle_object should inherit from the Base object from the specklepy module. Refer to the speckle guide for more information.

©Haskoning