unitelabs.labware.resource.schema

Packages

Classes

  • ResourceSchema

    Bases
    marshmallow.Schema

    Attributes

    • Name
      TYPE_MAPPING
      Type
      Value

      = {Decimal: DecimalField}

      Description

    • Name
      identifier
      Type
      Value

      = marshmallow.fields.String()

      Description

    • Name
      type
      Type
      Value

      = marshmallow.fields.Function(lambda obj: obj.__class__.__name__, dump_only=True)

      Description

    • Name
      parent
      Type
      Value

      = marshmallow.fields.Pluck(lambda: ResourceSchema(), 'identifier', dump_only=True, allow_none=True)

      Description

  • ChildrenField

    Bases
    marshmallow.fields.Pluck

    Methods

    • _deserialize(
        self,
        value,
        attr,
        data,
        partial,
        **kwargs
      ) -> None

      Parameters

      • Name
        self
        Type
        Default
        Description

      • Name
        value
        Type
        Default
        Description

      • Name
        attr
        Type
        Default
        Description

      • Name
        data
        Type
        Default
        Description

      • Name
        partial
        Type
        Default
        = None
        Description

      • Name
        **kwargs
        Type
        Default
        = {}
        Description

  • JsonSchema

    The structure used when serializing resources.

    Bases
    typing.TypedDict

    Attributes

    • Name
      root
      Type
      str
      Value

      = None

      Description

    • Name
      resources
      Type
      dict[str, dict[str, typing.Any]]
      Value

      = None

      Description

Copyright © 2024