Skip to main content
📚 Complete API Documentation: For detailed, auto-generated API reference documentation with all methods, properties, and parameters, visit the specklepy API Documentation.

Overview

The SpeckleClient is your main entry point for interacting with Speckle Server. It handles authentication and provides access to resource APIs (projects, models, versions, users, etc.).

Constructor

SpeckleClient()

Creates a new Speckle client instance. Parameters:
str
default:"\"https://app.speckle.systems\""
The Speckle server URL including protocol
bool
default:"True"
Whether to use SSL/TLS
bool
default:"True"
Whether to verify SSL certificates
Examples:
Only set verify_certificate=False for local development or testing. Always verify certificates in production!

Authentication

authenticate_with_token()

Authenticate using a personal access token. Parameters:
str
required
Personal access token from your Speckle profile
Example:
Get your personal access token from: Avatar → Profile → Personal Access Tokens in the Speckle web app.

authenticate_with_account()

Authenticate using an Account object from local Speckle Manager/Connector. Parameters:
Account
required
Account object from get_default_account() or get_local_accounts()
Example:
This method requires that you’ve previously logged in via Speckle Manager or a Speckle Connector (Rhino, Revit, etc.).

Properties

account

The currently authenticated account. Contains user information after authentication. Example:

Resource Properties

The client provides access to various resource APIs through these properties. Each resource has its own detailed documentation page.
Listing Projects: Workspace vs Non-Workspace Servers: The method for listing projects differs depending on your server deployment:
  • Workspace-enabled servers (e.g., app.speckle.systems): Use client.workspace.get_projects(workspace_id) to list projects within a workspace, or client.active_user.get_projects(filter=UserProjectsFilter(personalOnly=True)) for personal projects.
  • Non-workspace servers (self-hosted/open-source): Use client.active_user.get_projects() to list all projects you have access to. The workspace resource is not available.
For cross-server compatibility, check workspace support first:
Note: In earlier versions of specklepy, projects were accessed via the stream resource with a list() method. This has been replaced by the resource-based approach described above.

project

Access project operations (create, get, update, delete, list). Example:
See ProjectResource for complete API documentation.

model

Access model operations (create, get, update, delete, list). Example:
See ModelResource for complete API documentation.

version

Access version operations (create, get, list, update, delete). Example:
See VersionResource for complete API documentation.

active_user

Operations on the currently authenticated user (get profile, update, get projects, etc.). Example:
See ActiveUserResource for complete API documentation.

other_user

Operations for looking up other users (get by ID, search). Example:
See OtherUserResource for complete API documentation.

server

Server information and metadata. Example:
See ServerResource for complete API documentation.

workspace

Workspace Resource Availability: The workspace resource is available on the hosted Speckle server at app.speckle.systems and other workspace-enabled deployments.Self-hosted/open-source server deployments do not include workspace features and this resource will not be available. Attempting to use workspace methods on non-workspace servers will raise an error.Check your server capabilities before using workspace operations, or wrap calls in try/except blocks for cross-server compatibility.
Workspace operations (get workspace details, members, projects, settings). Example:
See WorkspaceResource for complete API documentation.

Custom GraphQL Queries

When the SDK doesn’t provide a method for a specific GraphQL operation, you can execute raw GraphQL queries using execute_query().

execute_query()

Execute a raw GraphQL query against the Speckle server. Parameters:
str
required
GraphQL query string (use gql() for proper formatting)
Returns:
Dict
Raw GraphQL response
Example:

When to Use Custom Queries

Use execute_query() when you need to:
  • Access GraphQL fields not exposed by SDK methods
  • Perform complex queries with specific field selections
  • Use new API features before SDK support is added
  • Optimize queries by requesting only needed fields
Example - Custom Fields:
Example - Mutations:
GraphQL Schema Documentation: To explore available queries, mutations, and fields, visit your Speckle server’s GraphQL playground:
  • Hosted server: https://app.speckle.systems/graphql
  • Self-hosted: https://your-server.com/graphql
The playground provides interactive documentation and autocomplete for the GraphQL schema.

FAQ

Never hardcode tokens in your source code. Use environment variables instead:
No. Create one client per server and reuse it for all operations:
Access the account property after authentication:
Create separate client instances for each server:
Workspace features are only available on specific deployments. Check before using:
Check the server version and adapt your code accordingly:
Common exceptions to handle:
The method for listing projects depends on whether the server has workspace features:
Note: Earlier versions of specklepy used stream.list() - this has been replaced by the resource-based approach above.
  1. Log in to your Speckle server (e.g., https://app.speckle.systems)
  2. Click your avatar in the top-right
  3. Go to Profile
  4. Navigate to Personal Access Tokens
  5. Click New Token
  6. Give it a name and select appropriate scopes
  7. Copy the token immediately (you won’t see it again!)
Store it securely as an environment variable or in a secrets manager.

Next Steps

Operations

Learn about send and receive operations

Resources

Explore detailed resource documentation

Authentication Guide

Detailed authentication setup

Quickstart

Complete tutorial using the client
Last modified on July 18, 2026