Module signals_notebook.entities.plates.cell

Expand source code
from enum import Enum
from typing import Generic, List, Optional, TypeVar
from uuid import UUID

from pydantic import Field
from pydantic.generics import GenericModel


CellContentType = TypeVar('CellContentType')


class ColumnDataType(str, Enum):
    NUMBER = 'NUMBER'
    INTEGER = 'INTEGER'
    DATE_TIME = 'DATETIME'
    TEXT = 'TEXT'
    LIST = 'LIST'
    MULTI_SELECT = 'MULTI_SELECT'
    ATTRIBUTE_LIST = 'ATTRIBUTE_LIST'
    AUTOTEXT_LIST = 'AUTOTEXT_LIST'
    BOOLEAN = 'BOOLEAN'
    UNIT = 'UNIT'
    LINK = 'LINK'
    EXTERNAL_LINK = 'EXTERNAL_LINK'


class CellContent(GenericModel, Generic[CellContentType]):
    user: Optional[str]
    value: Optional[CellContentType] = None
    values: Optional[List[CellContentType]] = None

    class Config:
        validate_assignment = True


class PlateCell(GenericModel, Generic[CellContentType]):
    id: UUID = Field(allow_mutation=False, alias='key')
    type: ColumnDataType = Field(allow_mutation=False)
    name: str = Field(allow_mutation=False)
    content: CellContent[CellContentType]

    class Config:
        validate_assignment = True

Classes

class CellContent (**data: Any)

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Expand source code
class CellContent(GenericModel, Generic[CellContentType]):
    user: Optional[str]
    value: Optional[CellContentType] = None
    values: Optional[List[CellContentType]] = None

    class Config:
        validate_assignment = True

Ancestors

  • pydantic.generics.GenericModel
  • pydantic.main.BaseModel
  • pydantic.utils.Representation
  • typing.Generic

Class variables

var Config
var user : Optional[str]
var value : Optional[~CellContentType]
var values : Optional[List[~CellContentType]]
class ColumnDataType (value, names=None, *, module=None, qualname=None, type=None, start=1)

An enumeration.

Expand source code
class ColumnDataType(str, Enum):
    NUMBER = 'NUMBER'
    INTEGER = 'INTEGER'
    DATE_TIME = 'DATETIME'
    TEXT = 'TEXT'
    LIST = 'LIST'
    MULTI_SELECT = 'MULTI_SELECT'
    ATTRIBUTE_LIST = 'ATTRIBUTE_LIST'
    AUTOTEXT_LIST = 'AUTOTEXT_LIST'
    BOOLEAN = 'BOOLEAN'
    UNIT = 'UNIT'
    LINK = 'LINK'
    EXTERNAL_LINK = 'EXTERNAL_LINK'

Ancestors

  • builtins.str
  • enum.Enum

Class variables

var ATTRIBUTE_LIST
var AUTOTEXT_LIST
var BOOLEAN
var DATE_TIME
var INTEGER
var LIST
var MULTI_SELECT
var NUMBER
var TEXT
var UNIT
class PlateCell (**data: Any)

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Expand source code
class PlateCell(GenericModel, Generic[CellContentType]):
    id: UUID = Field(allow_mutation=False, alias='key')
    type: ColumnDataType = Field(allow_mutation=False)
    name: str = Field(allow_mutation=False)
    content: CellContent[CellContentType]

    class Config:
        validate_assignment = True

Ancestors

  • pydantic.generics.GenericModel
  • pydantic.main.BaseModel
  • pydantic.utils.Representation
  • typing.Generic

Class variables

var Config
var contentCellContent
var id : uuid.UUID
var name : str
var typeColumnDataType