Registry / http-networking / benchling-sdk

benchling-sdk

JSON →
library1.25.0pypypiunverified

The Benchling SDK for Python provides a robust interface for interacting with the Benchling Platform, enabling programmatic access to its various functionalities including entities, assays, results, and workflows. It simplifies API interactions, handles authentication, and supports common data structures. The current version is 1.24.1, with frequent releases to keep pace with platform updates.

pip install benchling-sdk
INSTALL
IMPORT
SIG · BENCHLING-SDK
B
benchling-sdk
http-networkingpythonv1.25.0
Install
9.5s avg
Import
Disk
125MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.25.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 115.7MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 9.5s · import 0.000s · 117MB
125MB installed
● package 125MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BenchlingClient
from benchling_sdk import BenchlingClient
from benchling_sdk import BenchlingClient

Initializes the BenchlingClient using environment variables for authentication and fetches a list of entries as a basic connectivity test. Ensure `BENCHLING_API_KEY` and `BENCHLING_API_URL` are set.

import os from benchling_sdk.benchling import BenchlingClient # Ensure BENCHLING_API_KEY and BENCHLING_API_URL are set as environment variables api_key = os.environ.get("BENCHLING_API_KEY", "") api_url = os.environ.get("BENCHLING_API_URL", "") if not api_key or not api_url: print("Please set BENCHLING_API_KEY and BENCHLING_API_URL environment variables.") # In a real application, you might raise an exception or configure differently. exit(1) try: # Initialize the client. It automatically picks up BENCHLING_API_KEY and BENCHLING_API_URL. benchling_client = BenchlingClient() # Example: List up to 3 entries (requires appropriate permissions) entries = benchling_client.entries.list(page_size=3).items print(f"Successfully connected to Benchling. Found {len(entries)} entries.") for entry in entries: print(f" - Entry ID: {entry.id}, Name: {entry.name}") except Exception as e: print(f"An error occurred: {e}")
Debug
Known issues
breakingAs of `benchling-sdk` v1.23.0, API class methods and client initialization no longer accept string arguments for enum types. You must pass actual enum members.
fix
Replace string literals (e.g., `'DNA_OLIGO'`) with actual enum members (e.g., `PartType.DNA_OLIGO`). Refer to the specific enum class for valid members.
affects: >=1.23.0
gotchaThe SDK's pagination mechanism has evolved. Direct access to `response.results` might be deprecated or behave differently in newer versions compared to `response.items` or explicit iterators.
fix
Prefer `response.items` for the current page's results or use `response.to_iterator()` for efficient iteration over all pages. Always check the official documentation for the recommended pagination pattern.
affects: Pre-1.11.0 to current
gotchaBenchling API has rate limits. Frequent or large requests without proper handling can lead to `429 Too Many Requests` errors.
fix
Implement retry logic with exponential backoff. Monitor `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers in the response for current rate limit status.
affects: All
Upgrade
Version history
1.25.0latest on PyPI · released May 14, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
36 hits · last 30 days
node
34
OpenAI (training)
1
Resources
benchling-sdk — pip install benchling-sdk · libregistry