Benchling SDK Documentation ============================ .. note:: **Current Version: 1.23.0 (Latest)** You are viewing the documentation for the latest version of the Benchling SDK. The official Python SDK for `Benchling `_, providing programmatic access to the Benchling platform for life science R&D. Getting Started =============== Installation ------------ .. code-block:: bash pip install benchling-sdk Authentication -------------- Choose one of these authentication methods: **API Key Authentication:** .. code-block:: python from benchling_sdk import Benchling from benchling_sdk.auth.api_key_auth import ApiKeyAuth benchling = Benchling( url="https://your-tenant.benchling.com", auth=ApiKeyAuth("your_api_key_here") ) **OAuth2 Authentication:** .. code-block:: python from benchling_sdk import Benchling from benchling_sdk.auth.client_credentials_oauth2 import ClientCredentialsOAuth2 benchling = Benchling( url="https://your-tenant.benchling.com", auth=ClientCredentialsOAuth2( client_id="your_client_id", client_secret="your_client_secret" ) ) Examples ======== See `here `_ for more common SDK interactions and `here `_ for additional code recipes. Create a DNA Sequence --------------------- .. code-block:: python from benchling_sdk.models import DnaSequenceCreate # Create a new DNA sequence sequence = DnaSequenceCreate( name="My DNA Sequence", bases="ATGCGATCGATCGATC", folder_id="lib_abc123" # Your folder ID ) created_sequence = benchling.dna_sequences.create(sequence) print(f"Created sequence: {created_sequence.name} (ID: {created_sequence.id})") Get a Sequence by ID -------------------- .. code-block:: python # Retrieve an existing sequence sequence = benchling.dna_sequences.get_by_id("seq_abc123") print(f"Sequence: {sequence.name}") print(f"Bases: {sequence.bases}") Previous Versions ================= .. tip:: **Need an Older Version?** Previous SDK releases are available in the sidebar version selector. .. toctree:: :maxdepth: 4 :caption: Package contents: modules