Skip to main content

SDK for interacting with the Benchling Platform. Currently unsupported for production use.

Project description

Benchling SDK

A Python 3.8+ SDK for the Benchling platform.

Important! This is an unsupported pre-release not suitable for production use.

Getting Started

Installation

Install the dependency via Poetry (if applicable):

poetry add benchling-sdk

Or Pip:

pip install benchling-sdk

Using the SDK

Obtain a valid API key from your Benchling account and provide it to the SDK, along with the URL for the server. Example:

from benchling_sdk.benchling import Benchling
benchling = Benchling(url="https://my.benchling.com/api/v2", api_key="secure_api_key")

With Benchling now instantiated, make a sample call to all requests with the schema ID assaych_test:

requests = benchling.requests.list_all("assaych_test")

In general, API calls are synchronous and blocking.

Generators

Some methods which call paginated API endpoints will produce Python generators. Example:

requests_generator = benchling.requests.list("assaych_test")
next_request = next(requests_generator)

Error Handling

Failed API interactions will generally return a BenchlingError, which will contain some underlying information on the HTTP response such as the status. Example:

from benchling_sdk.errors import BenchlingError

try:
    requests = benchling.requests.list_all("assaych_test")
except BenchlingError as error:
    print(error.status_code)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

benchling-sdk-0.1.1a0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

benchling_sdk-0.1.1a0-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file benchling-sdk-0.1.1a0.tar.gz.

File metadata

  • Download URL: benchling-sdk-0.1.1a0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/4.14.171-136.231.amzn2.x86_64

File hashes

Hashes for benchling-sdk-0.1.1a0.tar.gz
Algorithm Hash digest
SHA256 55dd5d7a3b06fbc387993b0eac355b7eb8a1d5a560e49d4a0f5b87b1738022ae
MD5 06e0c9527ef5d50a476f939da7e2033b
BLAKE2b-256 7796b617888b2bf5d6ceac064354c6295891b85c4657ac15603dc6e713d437cd

See more details on using hashes here.

File details

Details for the file benchling_sdk-0.1.1a0-py3-none-any.whl.

File metadata

  • Download URL: benchling_sdk-0.1.1a0-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/4.14.171-136.231.amzn2.x86_64

File hashes

Hashes for benchling_sdk-0.1.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 4665e8a76422a1900b6f03a8044265986181ec5cbf70f97424745c48a70d9c4b
MD5 d62ac953d9c600d1daeadf1b6b5a51e0
BLAKE2b-256 237251951cbea1e24cc199b302d2d483b400264edd322362c85f3272661d28e1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page