Intégration de Benchling
/SKILLIntégration de Benchling Python SDK et REST API pour les entités de registre, l'inventaire, les entrées ELN, workflows, les applications Benchling et les requêtes vers l'entrepôt de données.
name: benchling-integration
description: Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.
license: MIT
allowed-tools: Read Write Edit Bash
compatibility: Requires a Benchling account, tenant URL, and API key or OAuth app credentials. Install benchling-sdk with uv pip install.
requiredenvironmentvariables: [{"name": "BENCHLINGTENANTURL", "prompt": "Benchling tenant base URL.", "requiredfor": "full functionality"}, {"name": "BENCHLINGAPIKEY", "prompt": "API key auth (alternative to OAuth).", "requiredfor": "optional features"}, {"name": "BENCHLINGCLIENTID", "prompt": "OAuth app client id.", "requiredfor": "optional features"}, {"name": "BENCHLINGCLIENTSECRET", "prompt": "OAuth app client secret.", "requiredfor": "optional features"}, {"name": "BENCHLINGPRODTENANTURL", "prompt": "Production tenant URL (multi-env setups).", "requiredfor": "optional features"}, {"name": "BENCHLINGPRODAPIKEY", "prompt": "Production API key (multi-env setups).", "requiredfor": "optional features"}, {"name": "BENCHLINGSTAGINGTENANTURL", "prompt": "Staging tenant URL (multi-env setups).", "requiredfor": "optional features"}, {"name": "BENCHLINGSTAGINGAPIKEY", "prompt": "Staging API key (multi-env setups).", "requiredfor": "optional features"}]
metadata: {"version": "1.3", "skill-author": "K-Dense Inc.", "openclaw": {"primaryEnv": "BENCHLINGAPIKEY", "envVars": [{"name": "BENCHLINGTENANTURL", "required": true, "description": "Benchling tenant base URL."}, {"name": "BENCHLINGAPIKEY", "required": false, "description": "API key auth (alternative to OAuth)."}, {"name": "BENCHLINGCLIENTID", "required": false, "description": "OAuth app client id."}, {"name": "BENCHLINGCLIENTSECRET", "required": false, "description": "OAuth app client secret."}, {"name": "BENCHLINGPRODTENANTURL", "required": false, "description": "Production tenant URL (multi-env setups)."}, {"name": "BENCHLINGPRODAPIKEY", "required": false, "description": "Production API key (multi-env setups)."}, {"name": "BENCHLINGSTAGINGTENANTURL", "required": false, "description": "Staging tenant URL (multi-env setups)."}, {"name": "BENCHLINGSTAGINGAPIKEY", "required": false, "description": "Staging API key (multi-env setups)."}]}}
Benchling Integration
Overview
Benchling is a cloud platform for life sciences R&D. Access registry entities (DNA, RNA, proteins), inventory, electronic lab notebooks, and workflows programmatically via the Python SDK and REST API.
Version note: Examples target benchling-sdk 1.25.0 (latest stable on PyPI). Docs: benchling.com/sdk-docs. Platform guide: docs.benchling.com.
When to Use This Skill
This skill should be used when:
- Working with Benchling's Python SDK or REST API
- Managing biological sequences (DNA, RNA, proteins) and registry entities
- Automating inventory operations (samples, containers, locations, transfers)
- Creating or querying electronic lab notebook entries
- Building workflow automations or Benchling Apps
- Syncing data between Benchling and external systems
- Querying the Benchling Data Warehouse for analytics
- Setting up event-driven integrations with AWS EventBridge
Core Capabilities
1. Authentication & Setup
Python SDK installation:
uv pip install "benchling-sdk==1.25.0"Preview builds (alpha; not for production):
uv pip install "benchling-sdk" --prerelease allowEnvironment variables (scoped reads only):
Read only the named keys you need — never dump or iterate over the full environment:
import os
tenant_url = os.environ.get("BENCHLING_TENANT_URL") # e.g. https://your-tenant.benchling.com
api_key = os.environ.get("BENCHLING_API_KEY")
if not tenant_url or not api_key:
raise ValueError("Set BENCHLING_TENANT_URL and BENCHLING_API_KEY")Obtain an API key from Profile Settings in Benchling. For OAuth apps, use the [Developer Console](https://docs.benchling.com/docs/getting-started-benchling-apps) and store BENCHLING_CLIENT_ID / BENCHLING_CLIENT_SECRET separately.
Authentication methods:
API key (scripts and personal automation):
from benchling_sdk.benchling import Benchling
from benchling_sdk.auth.api_key_auth import ApiKeyAuth
benchling = Benchling(
url=tenant_url,
auth_method=ApiKeyAuth(api_key),
)OAuth client credentials (multi-user apps and production integrations):
from benchling_sdk.benchling import Benchling
from benchling_sdk.auth.client_credentials_oauth2 import ClientCredentialsOAuth2
benchling = Benchling(
url=tenant_url,
auth_method=ClientCredentialsOAuth2(
client_id=os.environ["BENCHLING_CLIENT_ID"],
client_secret=os.environ["BENCHLING_CLIENT_SECRET"],
),
)**Key poin