The Speckle Data Model
Speckle uses an object-based approach rather than a file-based one. This is a fundamental shift from traditional CAD/BIM workflows.Traditional (File-Based)
- Data locked in files (.rvt, .3dm, .ifc)
- Full file transfer required
- Version control through file copies
- Large files, slow transfers
Speckle (Object-Based)
- Data is individual objects
- Incremental transfers (only changes)
- Built-in version control
- Fast, efficient streaming
Key Concepts
1. Objects
Everything in Speckle is an object that inherits from theBase class.
Objects are immutable once sent - their hash (object ID) uniquely identifies their content.
Static vs Dynamic Properties
Speckle objects support both static (typed) and dynamic (untyped) properties. Static properties are defined in the class with type hints and provide IDE autocomplete, while dynamic properties can be added at runtime for application-specific data.Learn more about Static vs Dynamic Properties including type checking, required vs optional properties, and how to work with both types.
2. Projects, Models, and Versions
Speckle organizes data in a three-level hierarchy:- Contain multiple models
- Have members with roles (owner, contributor, reviewer)
- Unique ID and name
- Examples: “site-boundary”, “design-option-a”, “structural”, “MEP”
- Each model has its own version history
- Immutable - cannot be changed after creation
- Reference a root object by its ID (hash)
- Have a message describing the changes
- Include metadata (author, timestamp, source application)
3. Object IDs (Hashes)
Every object has a unique object ID (also called a hash) that’s deterministically generated from its content.This enables:
- Deduplication - Identical objects stored once
- Incremental sync - Only new/changed objects transferred
- Content addressing - Objects referenced by their hash
4. Transports
Transports are the mechanism for moving objects between locations.- ServerTransport
- SQLiteTransport
- MemoryTransport
Communicates with Speckle Server
5. Operations: Send and Receive
Theoperations module provides the core functions for data transfer.
send()
Serializes an object and sends it via transports:send() automatically handles:- Object serialization
- Child object detection
- Chunking large arrays
- Deduplication
- Parallel uploads
receive()
Receives an object by its ID:6. Serialization
Objects are serialized to JSON for storage and transport:Most developers won’t need to know the serialization and deserialization functions directly. The
send() and receive() operations handle serialization and deserialization implicitly. Use these functions only when you need custom workflows like saving objects to files or working with JSON representations directly.Serialization automatically handles:
- Nested objects (converted to references)
- Large arrays (chunked and detached)
- Type information (preserved via
speckle_type) - Units (tracked and converted)
7. Orphaned Objects
Objects sent to the server but not referenced by any version are called “orphaned” or “zombie” objects. While they exist in the database and have object IDs, they are effectively unreachable and cannot be browsed or retrieved through the normal Speckle UI or workflows.
- Orphaned objects remain in the database but are not discoverable
- You can still retrieve them if you have the object ID:
operations.receive(obj_id=object_id) - Always create a version after sending important data
- The server may eventually clean up orphaned objects (implementation-dependent)
The Object Lifecycle
Here’s how objects flow through a typical workflow:Send Workflow
Receive Workflow
1
Create
Create Python objects using specklepy classes
2
Send
Send objects via a transport
3
Version
Create a version referencing the object
4
Get Version
Retrieve a version to access its data
5
Receive
Receive objects by ID
The Type System
Speckle uses a type system to preserve object types across different platforms:Built-in Types
Geometry (Objects.Geometry.*)
Geometry (Objects.Geometry.*)
- Point, Vector, Line, Polyline, Arc, Circle
- Curve, Polycurve, Mesh, Surface
- Plane, Box, Region, Spiral
- Ellipse, PointCloud, ControlPoint
Data (Objects.Data.*)
Data (Objects.Data.*)
- DataObject - Generic data container with name, properties, and displayValue
- BlenderObject - Blender-specific data object
- QgisObject - QGIS-specific data object
Annotation (Objects.Annotation.*)
Annotation (Objects.Annotation.*)
- Text - Text annotations with alignment and positioning
Primitive (Objects.Primitive.*)
Primitive (Objects.Primitive.*)
- Interval - Numeric interval with start and end values
Other (Objects.Other.*)
Other (Objects.Other.*)
- RenderMaterial - Physically based material properties
- LevelProxy - Level reference proxy
- RenderMaterialProxy - Material reference proxy
Custom Types
You can create your own types:Connector CompatibilityMost Speckle connectors will not recognize custom types when receiving data into host applications. Your custom objects will likely be ignored during conversion to native application objects.Best Practice: Include a See Display Values for more details on making your objects visible and interoperable.
displayValue property with mesh geometry to ensure your custom objects are at least visible in the Speckle viewer and can be converted to generic native objects with geometry:Local Cache
specklepy maintains a local SQLite cache:-
Location:
- Windows:
%APPDATA%\Speckle - macOS:
~/.config/Speckle - Linux:
~/.local/share/Speckle
- Windows:
-
Purpose:
- Cache received objects for faster access
- Enable offline work
- Reduce network transfers
-
Automatic: Used by default in
send()andreceive()