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.69ofbenchling_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.
DnaOligoinstead ofEntityOrInaccessibleResourceinside aContainerContent) - Improved fidelity when deserializing objects: If the SDK cannot properly deserialize an object, it will return an instance of
UnknownTypewith properties available inadditional_properties.
- Polymorphic types (e.g.
BenchlingErrorclass is now hashable- Support for
registryIdparameter in listing endpoints inbenchling.schemas - Support for creation times filtering options in
benchling.assay_results.list() - Dependency constraints for the
attrspackage are relaxed to allow major version 22 - Dependency on
httpxpinned to version 23+
Deprecated/Removed:
benchling.dna_alignmentsis deprecated in favor ofbenchling.nucleotide_alignmentsbenchling.v2.beta.apps.get_configuration_by_app_idis deprecated in favor ofbenchling.apps.list_app_configuration_items- Some models that were available but unused have been removed. Specifically:
IngredientAmountRnaSequenceCreateRequestRnaSequenceForBaseForCreateRequestRnaSequenceForBulkUpdateRequest
Fixes:
names_any_ofparameter 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
stringnow deserialize correctly as strings rather than objects (e.g.Mixture.amount) benchling.assay_runs.bulk_getcorrectly parses lists ofassay_run_idsmax_created_timeandmin_created_timeparameters forbenchling.assay_results.listcorrectly accept unix timestamps instead of datetime- Non-nullable enum values correctly default to
UNSETinstead ofNone - Listing endpoint parameters that specify
Iterablenow correctly support any iterable type - Custom
httpxclients now properly supported when usingbenchling.apito make custom calls
When is this happening?
Version 1.5.0 of the Benchling SDK is now live! Find the SDK in PyPI
