A Python client for Speckle servers.
Project description
PySpeckle
A Python Speckle Client
Speckle: open digital infrastructure for designing, making and operating the built environment. We reimagine the design process from the Internet up: Speckle is an open source (MIT) initiative for developing an extensible Design & AEC data communication and collaboration platform.
Installation
PySpeckle can be installed through pip
:
pip install speckle
Disclaimer
This code is WIP and as such should be used with caution, on non-sensitive projects.
Description
PySpeckle is a light Python wrapper / interface for the Speckle framework. It can be used independently through Python scripts, or as a base for building various plug-ins, such as SpeckleBlender.
Quick Start
Here is how you initialise a client, authenticate and start speckling:
from speckle import SpeckleApiClient
client = SpeckleApiClient('hestia.speckle.works')
client.login(
email='test@test.com',
password='Speckle<3Python'
)
stream_id = 'HjenwS2s'
stream = client.streams.get(stream_id)
for object in stream.objects:
print(object.dict())
To get a list of all available streams and find a particular one by name:
streams = client.streams.list()
name = "JetStream"
try:
stream_id = [s for s in streams if s.name == name][0].streamId
except:
print("Stream {} not found.".format(name))
return
To get all objects from a stream:
for o in stream.objects:
try:
obj = client.objects.get(o.id)
except:
continue
print("Object {} is type {}.".format(obj.name, obj.type))
Usage documentation can be found here.
Maintainers
SpeckleBlender is written and maintained by Tom Svilans (Github), Izzy Lyseggen and Antoine Dao.
Notes
Commit formatting can be found here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.