Skip to content

transformationconfig

Pydantic Transformation Configuration Data Model.

A transformation status data model is provided as well. This data model represents what should be returned from the strategy's status() method.

PriorityEnum (str, Enum)

Defining process priority enumerators.

Process priorities:

  • Low
  • Medium
  • High
Source code in oteapi/models/transformationconfig.py
class PriorityEnum(str, Enum):
    """Defining process priority enumerators.

    Process priorities:

    - Low
    - Medium
    - High

    """

    LOW = "Low"
    MEDIUM = "Medium"
    HIGH = "High"

HIGH

LOW

MEDIUM

TransformationConfig (BaseModel) pydantic-model

Transformation Strategy Data Configuration.

Source code in oteapi/models/transformationconfig.py
class TransformationConfig(BaseModel):
    """Transformation Strategy Data Configuration."""

    transformation_type: str = Field(
        ...,
        description=(
            "Type of registered transformation strategy. E.g., `celery/remote`."
        ),
    )
    name: Optional[str] = Field(
        None, description="Human-readable name of the transformation strategy."
    )
    description: Optional[str] = Field(
        None, description="A free-text account of the transformation."
    )
    due: Optional[datetime] = Field(
        None,
        description=(
            "Optional field to indicate a due data/time for when a transformation "
            "should finish."
        ),
    )
    priority: Optional[PriorityEnum] = Field(
        PriorityEnum.MEDIUM,
        description="Define the process priority of the transformation execution.",
    )
    secret: Optional[str] = Field(
        None,
        description="Authorization secret given when running a transformation.",
    )
    configuration: Optional[Dict] = Field(
        None,
        description=(
            "Transformation-specific configuration options given as key/value-pairs."
        ),
    )

configuration: Dict pydantic-field

Transformation-specific configuration options given as key/value-pairs.

description: str pydantic-field

A free-text account of the transformation.

due: datetime pydantic-field

Optional field to indicate a due data/time for when a transformation should finish.

name: str pydantic-field

Human-readable name of the transformation strategy.

priority: PriorityEnum pydantic-field

Define the process priority of the transformation execution.

secret: str pydantic-field

Authorization secret given when running a transformation.

transformation_type: str pydantic-field required

Type of registered transformation strategy. E.g., celery/remote.

TransformationStatus (BaseModel) pydantic-model

Return from transformation status.

Source code in oteapi/models/transformationconfig.py
class TransformationStatus(BaseModel):
    """Return from transformation status."""

    id: str = Field(..., description="ID for the given transformation process.")
    status: Optional[str] = Field(
        None, description="Status for the transformation process."
    )
    messages: Optional[List[str]] = Field(
        None, description="Messages related to the transformation process."
    )
    created: Optional[datetime] = Field(
        None,
        description="Time of creation for the transformation process. Given in UTC.",
    )
    startTime: Optional[datetime] = Field(
        None, description="Time when the transformation process started. Given in UTC."
    )
    finishTime: Optional[datetime] = Field(
        None, description="Time when the tranformation process finished. Given in UTC."
    )

created: datetime pydantic-field

Time of creation for the transformation process. Given in UTC.

finishTime: datetime pydantic-field

Time when the tranformation process finished. Given in UTC.

id: str pydantic-field required

ID for the given transformation process.

messages: List[str] pydantic-field

Messages related to the transformation process.

startTime: datetime pydantic-field

Time when the transformation process started. Given in UTC.

status: str pydantic-field

Status for the transformation process.

Back to top