benchling_api_client.extensions module

class Enums

Bases: object

class KnownInt

Bases: enum.IntEnum

An enumeration.

static known() bool
class KnownString

Bases: str, enum.Enum

An enumeration.

static known() bool
class UnknownInt

Bases: enum.IntEnum

An enumeration.

static known() bool
class UnknownString

Bases: str, enum.Enum

An enumeration.

static known() bool
exception NotPresentError

Bases: Exception

__init__(parent: Any, path: str)
message: str
parent_name: str
path: str
class UnknownType

Bases: object

Represents a polymorphic type that this version of the SDK is not aware of.

Oftentimes in e.g. listing endpoints, many different types of an entity can be returned. As new features are added, new types can be returned from that same endpoint, but given that the SDK may not have been updated to know how to deserialize them, this would normally cause an error during deserialization. This prevents normal program flow in cases which could be otherwise written defensively: none of the fields are programmatically accessible if deserialization fails, but programs may opt to handle errors or use the information they do know how to work with if serialization is made to be more ‘nice.’

__init__(value: Any) None

Method generated by attrs for class UnknownType.

value: Any