Benchling SDK Version 1.5.0 Release
Version 1.5.0 of the Benchling SDK includes sweeping fixes, promotion of various alpha
and beta
features, and support for new features like App Configuration, RNA, and more. Version 1.5.0 includes bug fixes that may result in breaking changes; read on for more details.
What’s changing?
The release of version 1.5.0 represents a significant investment in improving the stability and functionality of the Benchling SDK. In addition to adding new functionality and updating dependencies, this release includes a number of bug fixes across various areas in the SDK. While we’ve made every effort to preserve backwards compatibility in this release, some fixes involve changes in method signature or return value that constitute a breaking change according to strict semantic versioning.
These changes involve fixing functionality that was not working as designed in version 1.4.1 or earlier, or are required to enable such fixes, and we expect the impact on most SDK users to be low. While there is net-new functionality, this version does not represent a major evolution of the Benchling SDK. For this reason, we’ve decided to not adhere to strict semantic versioning, and tag this version as MINOR (i.e. 1.5.0) instead of MAJOR (i.e. 2.0.0).
For the purposes of evaluating whether version 1.5.0 will be compatible with your existing implementation, please reference the following list of changes:
Added:
- Updated API shapes based on version
2.0.69
ofbenchling_api_client
- Support for App Configuration endpoints via
benchling.apps
- Support for molecule endpoints via
benchling.molecules
- Support for RNA sequence endpoints via
benchling.rna_sequences
- Support for nucleotide alignments endpoints via
benchling.nucleotide_alignments
- Beta support for Worklists endpoints via
benchling.v2.beta.worklists
- Beta support for
find_matching_regions()
(promoted from alpha) viabenchling.v2.beta.aa_sequences.find_matching_regions()
Updated:
- Improved deserializing of domain entities returned by the API
- Polymorphic types (e.g.
EntityOrInaccessibleResource
) are now Union types instead of classes. This means that these types cannot be instantiated, and are available only as type declarations. - The SDK will now return instances of the correct domain entity instead of returning an instance of a polymorphic class whenever possible (e.g.
DnaOligo
instead ofEntityOrInaccessibleResource
inside aContainerContent
) - Improved fidelity when deserializing objects: If the SDK cannot properly deserialize an object, it will return an instance of
UnknownType
with properties available inadditional_properties
.
- Polymorphic types (e.g.
BenchlingError
class is now hashable- Support for
registryId
parameter in listing endpoints inbenchling.schemas
- Support for creation times filtering options in
benchling.assay_results.list()
- Dependency constraints for the
attrs
package are relaxed to allow major version 22 - Dependency on
httpx
pinned to version 23+
Deprecated/Removed:
benchling.dna_alignments
is deprecated in favor ofbenchling.nucleotide_alignments
benchling.v2.beta.apps.get_configuration_by_app_id
is deprecated in favor ofbenchling.apps.list_app_configuration_items
- Some models that were available but unused have been removed. Specifically:
IngredientAmount
RnaSequenceCreateRequest
RnaSequenceForBaseForCreateRequest
RnaSequenceForBulkUpdateRequest
Fixes:
names_any_of
parameter in listing endpoints now correctly parses names which contain a commabenchling.mixtures.list()
no longer fails when component volume is assigned- Corrected the return type of
benchling.registry.entities()
to reflect what the method actually returns at runtime- Note - This change doesn't impact the method's functionality, but it could impact code that is casting the returned object or otherwise relying on specific typing checks
- SDK reference documentation now correctly reflects current stable release, excludes preview releases
- Using
copy()
ordeepcopy()
to clone SDK models no longer causes serialization failures when attributes areUNSET
- Improved serialization/deserialization of objects with fields that are not set (i.e.
None
) - Empty arrays passed to filter parameters in listing endpoints match no items instead of all items
- Types defined as
string
now deserialize correctly as strings rather than objects (e.g.Mixture.amount
) benchling.assay_runs.bulk_get
correctly parses lists ofassay_run_ids
max_created_time
andmin_created_time
parameters forbenchling.assay_results.list
correctly accept unix timestamps instead of datetime- Non-nullable enum values correctly default to
UNSET
instead ofNone
- Listing endpoint parameters that specify
Iterable
now correctly support any iterable type - Custom
httpx
clients now properly supported when usingbenchling.api
to make custom calls
When is this happening?
Version 1.5.0 of the Benchling SDK is now live! Find the SDK in PyPI