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
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 115.7MB
glibcpy 3.10–3.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.fixReplace 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.fixPrefer `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.fixImplement 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.