benchling_sdk.services.v2.stable.entity_service module

class EntityService

Bases: benchling_sdk.services.v2.base_service.BaseService

Entities.

Entities include DNA and AA sequences, oligos, molecules, custom entities, and other biological objects in Benchling. Entities support schemas, tags, and aliases, and can be registered.

See https://benchling.com/api/reference#/Entities

bulk_upsert(bulk_upsert: EntitiesBulkUpsertRequest, returning: Optional[Iterable[str]] = None) AsyncTaskLink

Upsert many entities at once.

All entities and their schemas must be within the same registry.

This operation performs the following actions:

  1. Any existing objects are looked up in Benchling by the provided entity registry ID.

  2. Then, all objects are either created or updated accordingly, temporarily skipping any schema field links between objects.

  3. Schema field links between objects are populated according to the provided identifier. In the value field of the Field resource, the entity registry ID may be provided instead of the API ID if desired. You may link to objects being created in the same operation.

  4. Entities are registered, using the provided name and entity registry ID.

If any action fails, the whole operation is canceled and no objects are created or updated. See https://benchling.com/api/reference#/Entities/bulkUpsertEntities