Skip to content

sift_client.sift_types

Sift Types - Pydantic models for Sift resources.

This module provides strongly-typed Pydantic models for interacting with Sift resources. These models are used throughout the Sift client to provide type safety, validation, and convenient methods for working with Sift objects.

Resource BaseTypes

Resource BaseTypes are immutable Pydantic models that represent specific Sift objects retrieved from the API. They provide:

  • Type-safe access to all resource properties
  • Convenience methods for common operations (update, archive, etc.)
  • Related resource access via properties (e.g., asset.runs, run.assets)
  • Rich integration with IDEs for autocomplete and type checking

Available Resource Types

  • Asset - Physical or logical entities (vehicles, machines, devices)
  • Run - Time-bounded operational periods for an asset
  • Channel - Time-series data streams (sensor readings, telemetry)
  • etc.

Create and Update Types

Create and Update types are Pydantic models used to create new resources or modify existing ones. They can be used directly as typed objects or as dictionaries for convenience.

Create Types

Create types define the required and optional fields for creating new resources. For example:

  • RunCreate - Create a new run
  • CalculatedChannelCreate - Create a new calculated channel
  • RuleCreate - Create a new rule
  • etc.

Update Types

Update types define which fields can be modified on existing resources. For example:

  • AssetUpdate - Update asset properties
  • RunUpdate - Update run properties
  • CalculatedChannelUpdate - Update calculated channel properties
  • etc.

Example Usage

from sift_client import SiftClient
from sift_client.sift_types import RunCreate, AssetUpdate

client = SiftClient(api_key="...", grpc_url="...", rest_url="...")

# Using Create types - typed approach
run = client.runs.create(
    RunCreate(
        name="Test Run",
        description="A test run",
        asset_ids=["asset123"],
        start_time=datetime.now(),
    )
)

# Using Create types - dict approach (more convenient)
run = client.runs.create({
    "name": "Test Run",
    "description": "A test run",
    "asset_ids": ["asset123"],
    "start_time": datetime.now(),
})

# Using Update types - typed approach
asset = client.assets.update(
    asset="asset123",
    update=AssetUpdate(tags=["production", "v2"])
)

# Using Update types - dict approach (more convenient)
asset = client.assets.update(
    asset="asset123",
    update={"tags": ["production", "v2"]}
)

# Using convenience methods on resource instances
asset.update({"tags": ["production", "v3"]})

Helper Types

Additional types are provided for specific use cases. For example:

  • ChannelReference - Reference to a channel in expressions
  • ChannelDataType - Enum for channel data types
  • ChannelBitFieldElement - Bit field element definition
  • RuleActionType - Enum for rule action types
  • RuleAnnotationType - Enum for annotation types
  • ChannelConfig - Configuration for data ingestion channels
  • Flow - Data flow configuration for ingestion
  • IngestionConfig - Complete ingestion configuration
  • etc.

Type Validation

All types use Pydantic for validation, ensuring:

  • Required fields are present
  • Field types are correct
  • Datetime fields have timezone information
  • Enum values are valid

Validation errors are raised immediately with clear error messages.

Immutability

Resource BaseTypes (Asset, Run, etc.) are immutable by default. To update a resource, use the update() method, which will update the instance in-place by replacing its internal state with the updated values from the API.

asset = client.assets.get(asset_id="asset123")
# This will raise an error - assets are immutable
# asset.name = "New Name"

# Instead, use the update method
asset.update({"tags": ["new-tag"]})  # Updates the instance in-place
MODULE DESCRIPTION
asset
calculated_channel
channel
file_attachment
ingestion
report
rule
run
tag
test_report
CLASS DESCRIPTION
Asset

Model of the Sift Asset.

AssetUpdate

Model of the Asset Fields that can be updated.

CalculatedChannel

Model of the Sift Calculated Channel.

CalculatedChannelCreate

Create model for a Calculated Channel.

CalculatedChannelUpdate

Update model for a Calculated Channel.

Channel

Model representing a Sift Channel.

ChannelBitFieldElement

Bit field element model.

ChannelConfig

Channel configuration model for ingestion purposes.

ChannelDataType

Enum for channel data types (mimics protobuf values, but as int for now).

ChannelReference

Channel reference for calculated channel or rule.

Flow

Model representing a data flow for ingestion.

FlowConfig

Model representing a data flow config for ingestion.

IngestionConfig

Model of the Sift Ingestion Config.

IngestionConfigCreate

Create model for IngestionConfig.

Report

Report model representing a data analysis report.

ReportRuleStatus

Report rule status.

ReportRuleSummary

ReportRuleSummary model representing a rule summary within a report.

ReportUpdate

Model of the Report fields that can be updated.

Rule

Model of the Sift Rule.

RuleAction

Model of a Rule Action.

RuleActionType

Enum for rule action kinds.

RuleAnnotationType

Enum for rule annotation types.

RuleCreate

Model for creating a new Rule.

RuleUpdate

Model of the Rule fields that can be updated.

RuleVersion

Model of a Rule Version.

Run

Run model representing a data collection run.

RunCreate

Create model for Run.

RunUpdate

Update model for Run.

Tag

Model of the Sift Tag.

TagCreate

Create model for Tag.

TagUpdate

Update model for Tag.

TestMeasurement

TestMeasurement model representing a measurement in a test.

TestMeasurementCreate

Create model for TestMeasurement.

TestMeasurementType

TestMeasurementType enum.

TestReport

TestReport model representing a test report.

TestReportCreate

Create model for TestReport.

TestReportUpdate

Update model for TestReport.

TestStatus

TestStatus enum.

TestStep

TestStep model representing a step in a test.

TestStepCreate

Create model for TestStep.

TestStepType

TestStepType enum.

Asset pydantic-model

Bases: BaseType[Asset, 'Asset'], FileAttachmentsMixin

Model of the Sift Asset.

Fields:

annotations property

annotations

Get the annotations for this asset.

archived_date pydantic-field

archived_date: datetime | None

attachments property

attachments: list[FileAttachment]

Get all file attachments for this entity.

RETURNS DESCRIPTION
list[FileAttachment]

A list of FileAttachments associated with this entity.

client property

client: SiftClient

created_by property

created_by

Get the user that created this asset.

created_by_user_id pydantic-field

created_by_user_id: str

created_date pydantic-field

created_date: datetime

id_ pydantic-field

id_: str | None = None

is_archived pydantic-field

is_archived: bool

metadata pydantic-field

metadata: dict[str, str | float | bool]

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

modified_by property

modified_by

Get the user that modified this asset.

modified_by_user_id pydantic-field

modified_by_user_id: str

modified_date pydantic-field

modified_date: datetime

name pydantic-field

name: str

organization_id pydantic-field

organization_id: str

proto pydantic-field

proto: Any | None = None

rules property

rules

Get the rules that apply to this asset.

runs property

runs: list[Run]

Get the runs associated with this asset.

tags pydantic-field

tags: list[str | Tag]

archive

archive(*, archive_runs: bool = False) -> Asset

Archive the asset.

PARAMETER DESCRIPTION
archive_runs

If True, archive all Runs associated with the Asset.

TYPE: bool DEFAULT: False

channels

channels(
    run: Run | str | None = None, limit: int | None = None
) -> list[Channel]

Get the channels for this asset.

delete_attachment

delete_attachment(
    file_attachment: list[FileAttachment | str]
    | FileAttachment
    | str,
) -> None

Delete one or more file attachments.

PARAMETER DESCRIPTION
file_attachment

A single FileAttachment or list of FileAttachments to delete.

TYPE: list[FileAttachment | str] | FileAttachment | str

unarchive

unarchive() -> Asset

Unarchive the asset.

update

update(update: AssetUpdate | dict) -> Asset

Update the Asset.

PARAMETER DESCRIPTION
update

Either an AssetUpdate instance or a dictionary of key-value pairs to update.

TYPE: AssetUpdate | dict

upload_attachment

upload_attachment(
    path: str | Path,
    metadata: dict[str, Any] | None = None,
    description: str | None = None,
    organization_id: str | None = None,
) -> FileAttachment

Upload a file attachment to a remote file.

PARAMETER DESCRIPTION
path

The path to the file to upload.

TYPE: str | Path

metadata

Optional metadata for the file (e.g., video/image metadata).

TYPE: dict[str, Any] | None DEFAULT: None

description

Optional description of the file.

TYPE: str | None DEFAULT: None

organization_id

Optional organization ID.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
FileAttachment

The uploaded FileAttachment.

AssetUpdate pydantic-model

AssetUpdate(**data: Any)

Bases: ModelUpdate[Asset]

Model of the Asset Fields that can be updated.

Fields:

  • _field_helpers_called (set[str])
  • _resource_id (str | None)
  • tags (list[str | Tag] | None)
  • metadata (dict[str, str | float | bool] | None)
  • is_archived (bool | None)

is_archived pydantic-field

is_archived: bool | None = None

metadata pydantic-field

metadata: dict[str, str | float | bool] | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

resource_id property writable

resource_id

tags pydantic-field

tags: list[str | Tag] | None = None

__init_subclass__

__init_subclass__(**kwargs)

to_proto_with_mask

to_proto_with_mask() -> tuple[ProtoT, FieldMask]

Convert to proto with field mask.

CalculatedChannel pydantic-model

Bases: BaseType[CalculatedChannel, 'CalculatedChannel']

Model of the Sift Calculated Channel.

Fields:

all_assets pydantic-field

all_assets: bool | None

archived_date pydantic-field

archived_date: datetime | None

asset_ids pydantic-field

asset_ids: list[str] | None

change_message pydantic-field

change_message: str | None

channel_references pydantic-field

channel_references: list[ChannelReference]

client property

client: SiftClient

client_key pydantic-field

client_key: str | None

created_by property

created_by

Get the user that created this calculated channel.

created_by_user_id pydantic-field

created_by_user_id: str | None

created_date pydantic-field

created_date: datetime | None

description pydantic-field

description: str

expression pydantic-field

expression: str

id_ pydantic-field

id_: str | None = None

is_archived pydantic-field

is_archived: bool

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

modified_by property

modified_by

Get the user that modified this calculated channel.

modified_by_user_id pydantic-field

modified_by_user_id: str | None

modified_date pydantic-field

modified_date: datetime | None

name pydantic-field

name: str

organization_id pydantic-field

organization_id: str | None

proto pydantic-field

proto: Any | None = None

tag_ids pydantic-field

tag_ids: list[str] | None

units pydantic-field

units: str | None

user_notes pydantic-field

user_notes: str | None

version pydantic-field

version: int | None

version_id pydantic-field

version_id: str | None

archive

archive() -> CalculatedChannel

Archive the calculated channel.

unarchive

unarchive() -> CalculatedChannel

Unarchive the calculated channel.

update

update(
    update: CalculatedChannelUpdate | dict,
    user_notes: str | None = None,
) -> CalculatedChannel

Update the Calculated Channel.

PARAMETER DESCRIPTION
update

The update to apply to the calculated channel. See CalculatedChannelUpdate for more updatable fields.

TYPE: CalculatedChannelUpdate | dict

user_notes

The user notes to apply to the calculated channel.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
CalculatedChannel

The updated calculated channel.

CalculatedChannelCreate pydantic-model

CalculatedChannelCreate(**data: Any)

Bases: CalculatedChannelBase, ModelCreate[CreateCalculatedChannelRequest]

Create model for a Calculated Channel.

Fields:

Validators:

  • _validate_asset_configuration
  • _validate_expression_and_channel_references

all_assets pydantic-field

all_assets: bool | None = None

asset_ids pydantic-field

asset_ids: list[str] | None = None

client_key pydantic-field

client_key: str | None = None

description pydantic-field

description: str | None = None

expression pydantic-field

expression: str | None = None

expression_channel_references pydantic-field

expression_channel_references: (
    list[ChannelReference] | None
) = None

metadata pydantic-field

metadata: dict[str, str | float | bool] | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

name pydantic-field

name: str

tag_ids pydantic-field

tag_ids: list[str] | None = None

units pydantic-field

units: str | None = None

user_notes pydantic-field

user_notes: str | None = None

__init_subclass__

__init_subclass__(**kwargs)

to_proto

to_proto() -> ProtoT

Convert to proto.

CalculatedChannelUpdate pydantic-model

CalculatedChannelUpdate(**data: Any)

Bases: CalculatedChannelBase, ModelUpdate[CalculatedChannel]

Update model for a Calculated Channel.

Fields:

Validators:

  • _validate_asset_configuration
  • _validate_expression_and_channel_references

all_assets pydantic-field

all_assets: bool | None = None

asset_ids pydantic-field

asset_ids: list[str] | None = None

description pydantic-field

description: str | None = None

expression pydantic-field

expression: str | None = None

expression_channel_references pydantic-field

expression_channel_references: (
    list[ChannelReference] | None
) = None

is_archived pydantic-field

is_archived: bool | None = None

metadata pydantic-field

metadata: dict[str, str | float | bool] | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

name pydantic-field

name: str | None = None

resource_id property writable

resource_id

tag_ids pydantic-field

tag_ids: list[str] | None = None

units pydantic-field

units: str | None = None

__init_subclass__

__init_subclass__(**kwargs)

to_proto_with_mask

to_proto_with_mask() -> tuple[ProtoT, FieldMask]

Convert to proto with field mask.

Channel pydantic-model

Bases: BaseType[Channel, 'Channel']

Model representing a Sift Channel.

Fields:

asset property

asset: Asset

Get the asset that this channel belongs to.

asset_id pydantic-field

asset_id: str

bit_field_elements pydantic-field

bit_field_elements: list[ChannelBitFieldElement]

client property

client: SiftClient

created_by_user_id pydantic-field

created_by_user_id: str

created_date pydantic-field

created_date: datetime

data_type pydantic-field

data_type: ChannelDataType

description pydantic-field

description: str

enum_types pydantic-field

enum_types: dict[str, int]

id_ pydantic-field

id_: str | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

modified_by_user_id pydantic-field

modified_by_user_id: str

modified_date pydantic-field

modified_date: datetime

name pydantic-field

name: str

proto pydantic-field

proto: Any | None = None

runs property

runs: list[Run]

Get all runs associated with this channel's asset.

unit pydantic-field

unit: str

data

data(
    *,
    run_id: str | None = None,
    start_time: datetime | None = None,
    end_time: datetime | None = None,
    limit: int | None = None,
    as_arrow: bool = False,
)

Retrieve channel data for this channel during the specified run.

PARAMETER DESCRIPTION
run_id

The run ID to get data for.

TYPE: str | None DEFAULT: None

start_time

The start time to get data for.

TYPE: datetime | None DEFAULT: None

end_time

The end time to get data for.

TYPE: datetime | None DEFAULT: None

limit

The maximum number of data points to return.

TYPE: int | None DEFAULT: None

as_arrow

Whether to return the data as an Arrow table.

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION

A dict of channel name to pandas DataFrame or Arrow Table object.

ChannelBitFieldElement pydantic-model

Bases: BaseModel

Bit field element model.

Fields:

bit_count pydantic-field

bit_count: int

index pydantic-field

index: int

name pydantic-field

name: str

ChannelConfig pydantic-model

Bases: BaseType[ChannelConfig, 'ChannelConfig']

Channel configuration model for ingestion purposes.

This model contains only the fields needed for ingestion configuration, without the full metadata from the Channels API.

Config:

  • frozen: False

Fields:

Validators:

  • _validate_enum_types

bit_field_elements pydantic-field

bit_field_elements: list[ChannelBitFieldElement] | None = (
    None
)

client property

client: SiftClient

data_type pydantic-field

data_type: ChannelDataType

description pydantic-field

description: str | None = None

enum_types pydantic-field

enum_types: dict[str, int] | None = None

id_ pydantic-field

id_: str | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

name pydantic-field

name: str

proto pydantic-field

proto: Any | None = None

unit pydantic-field

unit: str | None = None

as_channel_value

as_channel_value(value: Any) -> ChannelValue

Create a ChannelValue from a value using this channel's configuration.

PARAMETER DESCRIPTION
value

The value to wrap in a ChannelValue. The type should match this channel's data_type.

TYPE: Any

RETURNS DESCRIPTION
ChannelValue

A ChannelValue instance with this channel's name and data type,

ChannelValue

containing the provided value.

from_channel classmethod

from_channel(channel: Channel) -> ChannelConfig

Create ChannelConfig from a Channel.

PARAMETER DESCRIPTION
channel

The Channel to convert.

TYPE: Channel

RETURNS DESCRIPTION
ChannelConfig

A ChannelConfig with the channel's configuration data.

ChannelDataType

Bases: Enum

Enum for channel data types (mimics protobuf values, but as int for now).

METHOD DESCRIPTION
__str__
from_api_format

Convert API format string to ChannelDataType.

from_str

Convert string representation to ChannelDataType.

hash_str

Get the hash string for this channel data type.

proto_data_class

Return the appropriate protobuf class for the given channel data type.

ATTRIBUTE DESCRIPTION
BIT_FIELD

BOOL

BYTES

DOUBLE

ENUM

FLOAT

INT_32

INT_64

STRING

UINT_32

UINT_64

BIT_FIELD class-attribute instance-attribute

BIT_FIELD = CHANNEL_DATA_TYPE_BIT_FIELD

BOOL class-attribute instance-attribute

BOOL = CHANNEL_DATA_TYPE_BOOL

BYTES class-attribute instance-attribute

BYTES = CHANNEL_DATA_TYPE_BYTES

DOUBLE class-attribute instance-attribute

DOUBLE = CHANNEL_DATA_TYPE_DOUBLE

ENUM class-attribute instance-attribute

ENUM = CHANNEL_DATA_TYPE_ENUM

FLOAT class-attribute instance-attribute

FLOAT = CHANNEL_DATA_TYPE_FLOAT

INT_32 class-attribute instance-attribute

INT_32 = CHANNEL_DATA_TYPE_INT_32

INT_64 class-attribute instance-attribute

INT_64 = CHANNEL_DATA_TYPE_INT_64

STRING class-attribute instance-attribute

STRING = CHANNEL_DATA_TYPE_STRING

UINT_32 class-attribute instance-attribute

UINT_32 = CHANNEL_DATA_TYPE_UINT_32

UINT_64 class-attribute instance-attribute

UINT_64 = CHANNEL_DATA_TYPE_UINT_64

__str__

__str__() -> str

from_api_format staticmethod

from_api_format(val: str) -> ChannelDataType | None

Convert API format string to ChannelDataType.

PARAMETER DESCRIPTION
val

API format string representation of ChannelDataType.

TYPE: str

RETURNS DESCRIPTION
ChannelDataType | None

ChannelDataType if conversion is successful, None otherwise.

from_str staticmethod

from_str(raw: str) -> ChannelDataType | None

Convert string representation to ChannelDataType.

PARAMETER DESCRIPTION
raw

String representation of ChannelDataType.

TYPE: str

RETURNS DESCRIPTION
ChannelDataType | None

ChannelDataType if conversion is successful, None otherwise.

RAISES DESCRIPTION
Exception

If the string format is recognized but cannot be converted.

hash_str

hash_str(api_format: bool = False) -> str

Get the hash string for this channel data type.

proto_data_class staticmethod

proto_data_class(data_type: ChannelDataType)

Return the appropriate protobuf class for the given channel data type.

PARAMETER DESCRIPTION
data_type

The channel data type.

TYPE: ChannelDataType

RETURNS DESCRIPTION

The protobuf class corresponding to the data type.

RAISES DESCRIPTION
ValueError

If the data type is not recognized.

ChannelReference pydantic-model

Bases: BaseModel

Channel reference for calculated channel or rule.

Fields:

channel_identifier pydantic-field

channel_identifier: str

channel_reference pydantic-field

channel_reference: str

Flow pydantic-model

Bases: BaseModel

Model representing a data flow for ingestion.

A Flow represents a collection of channels that are ingested together.

A representation of the IngestWithConfigDataStreamRequest proto

Config:

  • frozen: False

Fields:

channel_values pydantic-field

channel_values: list[ChannelValue]

end_stream_on_validation_error pydantic-field

end_stream_on_validation_error: bool | None = None

flow pydantic-field

flow: str

ingestion_config_id pydantic-field

ingestion_config_id: str | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

organization_id pydantic-field

organization_id: str | None = None

run_id pydantic-field

run_id: str | None = None

timestamp pydantic-field

timestamp: datetime

FlowConfig pydantic-model

Bases: BaseType[FlowConfig, 'FlowConfig']

Model representing a data flow config for ingestion.

A FlowConfig represents the configuration of a collection of channels that are ingested together.

Config:

  • frozen: False

Fields:

channels pydantic-field

channels: list[ChannelConfig]

client property

client: SiftClient

id_ pydantic-field

id_: str | None = None

ingestion_config_id pydantic-field

ingestion_config_id: str | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

name pydantic-field

name: str

proto pydantic-field

proto: Any | None = None

run_id pydantic-field

run_id: str | None = None

add_channel

add_channel(channel: ChannelConfig)

Add a ChannelConfig to this Flow.

PARAMETER DESCRIPTION
channel

The ChannelConfig to add.

TYPE: ChannelConfig

RAISES DESCRIPTION
ValueError

If the flow has already been created with an ingestion config.

as_flow

as_flow(
    *,
    timestamp: datetime | None = None,
    values: dict[str, Any],
) -> Flow

Create a Flow from this FlowConfig with the provided values.

PARAMETER DESCRIPTION
timestamp

The timestamp for the flow. If None, uses the current UTC time.

TYPE: datetime | None DEFAULT: None

values

A dictionary mapping channel names to their values. Only channels present in this dictionary will be included in the resulting Flow.

TYPE: dict[str, Any]

RETURNS DESCRIPTION
Flow

A Flow object with channel values created from the provided values dictionary.

IngestionConfig pydantic-model

Bases: BaseType[IngestionConfig, 'IngestionConfig']

Model of the Sift Ingestion Config.

Fields:

asset_id pydantic-field

asset_id: str

client property

client: SiftClient

client_key pydantic-field

client_key: str

id_ pydantic-field

id_: str | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

proto pydantic-field

proto: Any | None = None

IngestionConfigCreate pydantic-model

IngestionConfigCreate(**data: Any)

Bases: ModelCreate[CreateIngestionConfigRequest]

Create model for IngestionConfig.

Fields:

asset_name pydantic-field

asset_name: str

client_key pydantic-field

client_key: str | None = None

flows pydantic-field

flows: list[FlowConfig] | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

organization_id pydantic-field

organization_id: str | None = None

__init_subclass__

__init_subclass__(**kwargs)

to_proto

to_proto() -> ProtoT

Convert to proto.

Report pydantic-model

Bases: BaseType[Report, 'Report']

Report model representing a data analysis report.

Config:

  • arbitrary_types_allowed: True

Fields:

archived_date pydantic-field

archived_date: datetime | None = None

client property

client: SiftClient

created_by_user_id pydantic-field

created_by_user_id: str

created_date pydantic-field

created_date: datetime

description pydantic-field

description: str

id_ pydantic-field

id_: str | None = None

is_archived pydantic-field

is_archived: bool

job_id pydantic-field

job_id: str

metadata pydantic-field

metadata: dict[str, str | float | bool]

model_config class-attribute instance-attribute

model_config = ConfigDict(arbitrary_types_allowed=True)

modified_by_user_id pydantic-field

modified_by_user_id: str

modified_date pydantic-field

modified_date: datetime

name pydantic-field

name: str

organization_id pydantic-field

organization_id: str

proto pydantic-field

proto: Any | None = None

report_template_id pydantic-field

report_template_id: str

rerun_from_report_id pydantic-field

rerun_from_report_id: str | None = None

run_id pydantic-field

run_id: str

summaries pydantic-field

summaries: list[ReportRuleSummary]

tags pydantic-field

tags: list[str]

archive

archive() -> Report

Archive the Report.

to_proto

to_proto() -> Report

Convert to protobuf message.

unarchive

unarchive() -> Report

Unarchive the Report.

ReportRuleStatus

Bases: Enum

Report rule status.

ATTRIBUTE DESCRIPTION
CANCELED

CREATED

ERROR

FAILED

FINISHED

LIVE

UNSPECIFIED

CANCELED class-attribute instance-attribute

CANCELED = 5

CREATED class-attribute instance-attribute

CREATED = 1

ERROR class-attribute instance-attribute

ERROR = 6

FAILED class-attribute instance-attribute

FAILED = 4

FINISHED class-attribute instance-attribute

FINISHED = 3

LIVE class-attribute instance-attribute

LIVE = 2

UNSPECIFIED class-attribute instance-attribute

UNSPECIFIED = 0

ReportRuleSummary pydantic-model

Bases: BaseType[ReportRuleSummary, 'ReportRuleSummary']

ReportRuleSummary model representing a rule summary within a report.

Fields:

asset_id pydantic-field

asset_id: str

client property

client: SiftClient

created_date pydantic-field

created_date: datetime

deleted_date pydantic-field

deleted_date: datetime | None = None

id_ pydantic-field

id_: str | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

modified_date pydantic-field

modified_date: datetime

num_failed pydantic-field

num_failed: int

num_open pydantic-field

num_open: int

num_passed pydantic-field

num_passed: int

proto pydantic-field

proto: Any | None = None

report_rule_version_id pydantic-field

report_rule_version_id: str

rule_client_key pydantic-field

rule_client_key: str | None = None

rule_id pydantic-field

rule_id: str

rule_version_id pydantic-field

rule_version_id: str

rule_version_number pydantic-field

rule_version_number: int

status pydantic-field

to_proto

to_proto() -> ReportRuleSummary

Convert to protobuf message.

ReportUpdate pydantic-model

ReportUpdate(**data: Any)

Bases: ModelUpdate[Report]

Model of the Report fields that can be updated.

Fields:

  • _field_helpers_called (set[str])
  • _resource_id (str | None)
  • is_archived (bool | None)
  • metadata (dict[str, str | float | bool] | None)
  • tags (list[str | Tag] | None)

is_archived pydantic-field

is_archived: bool | None = None

metadata pydantic-field

metadata: dict[str, str | float | bool] | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

resource_id property writable

resource_id

tags pydantic-field

tags: list[str | Tag] | None = None

__init_subclass__

__init_subclass__(**kwargs)

to_proto_with_mask

to_proto_with_mask() -> tuple[ProtoT, FieldMask]

Convert to proto with field mask.

Rule pydantic-model

Bases: BaseType[Rule, 'Rule']

Model of the Sift Rule.

Config:

  • frozen: True

Fields:

action pydantic-field

action: RuleAction | None

archived_date pydantic-field

archived_date: datetime | None

asset_ids pydantic-field

asset_ids: list[str] | None

asset_tag_ids pydantic-field

asset_tag_ids: list[str] | None

assets property

assets: list[Asset]

Get the assets that this rule applies to.

channel_references pydantic-field

channel_references: list[ChannelReference] | None

client property

client: SiftClient

client_key pydantic-field

client_key: str | None

contextual_channels pydantic-field

contextual_channels: list[str] | None

created_by property

created_by

Get the user that created this rule.

created_by_user_id pydantic-field

created_by_user_id: str

created_date pydantic-field

created_date: datetime

description pydantic-field

description: str

expression pydantic-field

expression: str | None

id_ pydantic-field

id_: str | None = None

is_archived pydantic-field

is_archived: bool

is_enabled pydantic-field

is_enabled: bool

is_external pydantic-field

is_external: bool

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

modified_by property

modified_by

Get the user that modified this rule.

modified_by_user_id pydantic-field

modified_by_user_id: str

modified_date pydantic-field

modified_date: datetime

name pydantic-field

name: str

organization property

organization

Get the organization that this rule belongs to.

organization_id pydantic-field

organization_id: str

proto pydantic-field

proto: Any | None = None

rule_version pydantic-field

rule_version: RuleVersion | None

tags property

tags: list[Tag]

Get the tags that this rule applies to.

archive

archive() -> Rule

Archive the rule.

unarchive

unarchive() -> Rule

Unarchive the rule.

update

update(
    update: RuleUpdate | dict,
    version_notes: str | None = None,
) -> Rule

Update the Rule.

PARAMETER DESCRIPTION
update

Either a RuleUpdate instance or a dictionary of key-value pairs to update.

TYPE: RuleUpdate | dict

version_notes

Notes associated with the change.

TYPE: str | None DEFAULT: None

RuleAction pydantic-model

Bases: BaseType[RuleAction, 'RuleAction']

Model of a Rule Action.

Fields:

action_type pydantic-field

action_type: RuleActionType

annotation_type pydantic-field

annotation_type: RuleAnnotationType | None = None

client property

client: SiftClient

condition_id pydantic-field

condition_id: str | None = None

created_by_user_id pydantic-field

created_by_user_id: str | None = None

created_date pydantic-field

created_date: datetime | None = None

default_assignee_user pydantic-field

default_assignee_user: str | None = None

id_ pydantic-field

id_: str | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

modified_by_user_id pydantic-field

modified_by_user_id: str | None = None

modified_date pydantic-field

modified_date: datetime | None = None

proto pydantic-field

proto: Any | None = None

tags property

tags: list[Tag]

Get the tags that this rule action applies to.

tags_ids pydantic-field

tags_ids: list[str] | None = None

version_id pydantic-field

version_id: str | None = None

annotation classmethod

annotation(
    annotation_type: RuleAnnotationType,
    tags: list[str | Tag],
    default_assignee_user: str | None = None,
) -> RuleAction

Create an annotation action.

PARAMETER DESCRIPTION
annotation_type

Type of annotation to create.

TYPE: RuleAnnotationType

default_assignee_user

User ID to assign the annotation to.

TYPE: str | None DEFAULT: None

tags

List of tags or tag IDs to add to the annotation.

TYPE: list[str | Tag]

RuleActionType

Bases: Enum

Enum for rule action kinds.

METHOD DESCRIPTION
from_str

Convert string representation to RuleActionType.

ATTRIBUTE DESCRIPTION
ANNOTATION

UNSPECIFIED

WEBHOOK

ANNOTATION class-attribute instance-attribute

ANNOTATION = ANNOTATION

UNSPECIFIED class-attribute instance-attribute

UNSPECIFIED = ACTION_KIND_UNSPECIFIED

WEBHOOK class-attribute instance-attribute

WEBHOOK = WEBHOOK

from_str classmethod

from_str(val: str) -> RuleActionType | None

Convert string representation to RuleActionType.

PARAMETER DESCRIPTION
val

String representation of RuleActionType.

TYPE: str

RETURNS DESCRIPTION
RuleActionType | None

RuleActionType if conversion is successful, None otherwise.

RuleAnnotationType

Bases: Enum

Enum for rule annotation types.

METHOD DESCRIPTION
from_str

Convert string representation to RuleAnnotationType.

ATTRIBUTE DESCRIPTION
DATA_REVIEW

PHASE

UNSPECIFIED

DATA_REVIEW class-attribute instance-attribute

DATA_REVIEW = 1

PHASE class-attribute instance-attribute

PHASE = 2

UNSPECIFIED class-attribute instance-attribute

UNSPECIFIED = 0

from_str classmethod

from_str(val: str) -> RuleAnnotationType | None

Convert string representation to RuleAnnotationType.

PARAMETER DESCRIPTION
val

String representation of RuleAnnotationType.

TYPE: str

RETURNS DESCRIPTION
RuleAnnotationType | None

RuleAnnotationType if conversion is successful, None otherwise.

RuleCreate pydantic-model

RuleCreate(**data: Any)

Bases: RuleCreateUpdateBase, ModelCreate[CreateRuleRequest]

Model for creating a new Rule.

Note: - asset_ids applies this rule to those assets. - asset_tag_ids applies this rule to assets with those tags.

Fields:

action pydantic-field

action: RuleAction

asset_ids pydantic-field

asset_ids: list[str] | None = None

asset_tag_ids pydantic-field

asset_tag_ids: list[str] | None = None

channel_references pydantic-field

channel_references: list[ChannelReference]

client_key pydantic-field

client_key: str | None = None

contextual_channels pydantic-field

contextual_channels: list[str] | None = None

description pydantic-field

description: str

expression pydantic-field

expression: str

is_external pydantic-field

is_external: bool = False

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

name pydantic-field

name: str

organization_id pydantic-field

organization_id: str | None = None

__init_subclass__

__init_subclass__(**kwargs)

to_proto

to_proto() -> ProtoT

Convert to proto.

RuleUpdate pydantic-model

RuleUpdate(**data: Any)

Bases: RuleCreateUpdateBase, ModelUpdate[Rule]

Model of the Rule fields that can be updated.

Note
  • assets applies this rule to those assets.
  • asset_tags applies this rule to assets with those tags.
  • contextual_channels are shown by UI to give context when viewing an annotation, but are not part of rule evaluation.

Fields:

action pydantic-field

action: RuleAction | None = None

asset_ids pydantic-field

asset_ids: list[str] | None = None

asset_tag_ids pydantic-field

asset_tag_ids: list[str] | None = None

channel_references pydantic-field

channel_references: list[ChannelReference] | None = None

client_key pydantic-field

client_key: str | None = None

contextual_channels pydantic-field

contextual_channels: list[str] | None = None

description pydantic-field

description: str | None = None

expression pydantic-field

expression: str | None = None

is_archived pydantic-field

is_archived: bool | None = None

is_external pydantic-field

is_external: bool = False

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

name pydantic-field

name: str | None = None

organization_id pydantic-field

organization_id: str | None = None

resource_id property writable

resource_id

__init_subclass__

__init_subclass__(**kwargs)

to_proto_with_mask

to_proto_with_mask() -> tuple[ProtoT, FieldMask]

Convert to proto with field mask.

RuleVersion pydantic-model

Bases: BaseType[RuleVersion, 'RuleVersion']

Model of a Rule Version.

Fields:

archived_date pydantic-field

archived_date: datetime | None

client property

client: SiftClient

created_by_user_id pydantic-field

created_by_user_id: str

created_date pydantic-field

created_date: datetime

generated_change_message pydantic-field

generated_change_message: str

id_ pydantic-field

id_: str | None = None

is_archived pydantic-field

is_archived: bool

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

proto pydantic-field

proto: Any | None = None

rule_id pydantic-field

rule_id: str

rule_version_id pydantic-field

rule_version_id: str

version pydantic-field

version: str

version_notes pydantic-field

version_notes: str

Run pydantic-model

Bases: BaseType[Run, 'Run'], FileAttachmentsMixin

Run model representing a data collection run.

Fields:

archived_date pydantic-field

archived_date: datetime | None

asset_ids pydantic-field

asset_ids: list[str]

assets property

assets: list[Asset]

Return all assets associated with this run.

attachments property

attachments: list[FileAttachment]

Get all file attachments for this entity.

RETURNS DESCRIPTION
list[FileAttachment]

A list of FileAttachments associated with this entity.

client property

client: SiftClient

client_key pydantic-field

client_key: str | None

created_by_user_id pydantic-field

created_by_user_id: str

created_date pydantic-field

created_date: datetime

default_report_id pydantic-field

default_report_id: str | None

description pydantic-field

description: str

duration pydantic-field

duration: timedelta | None

id_ pydantic-field

id_: str | None = None

is_adhoc pydantic-field

is_adhoc: bool

is_archived pydantic-field

is_archived: bool

metadata pydantic-field

metadata: dict[str, str | float | bool]

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

modified_by_user_id pydantic-field

modified_by_user_id: str

modified_date pydantic-field

modified_date: datetime

name pydantic-field

name: str

organization_id pydantic-field

organization_id: str

proto pydantic-field

proto: Any | None = None

start_time pydantic-field

start_time: datetime | None

stop_time pydantic-field

stop_time: datetime | None

tags pydantic-field

tags: list[str]

archive

archive() -> Run

Archive the run.

delete_attachment

delete_attachment(
    file_attachment: list[FileAttachment | str]
    | FileAttachment
    | str,
) -> None

Delete one or more file attachments.

PARAMETER DESCRIPTION
file_attachment

A single FileAttachment or list of FileAttachments to delete.

TYPE: list[FileAttachment | str] | FileAttachment | str

stop

stop() -> Run

Stop the run.

unarchive

unarchive() -> Run

Unarchive the run.

update

update(update: RunUpdate | dict) -> Run

Update the Run.

PARAMETER DESCRIPTION
update

The update to apply to the run. See RunUpdate for more updatable fields.

TYPE: RunUpdate | dict

RETURNS DESCRIPTION
Run

The updated run.

upload_attachment

upload_attachment(
    path: str | Path,
    metadata: dict[str, Any] | None = None,
    description: str | None = None,
    organization_id: str | None = None,
) -> FileAttachment

Upload a file attachment to a remote file.

PARAMETER DESCRIPTION
path

The path to the file to upload.

TYPE: str | Path

metadata

Optional metadata for the file (e.g., video/image metadata).

TYPE: dict[str, Any] | None DEFAULT: None

description

Optional description of the file.

TYPE: str | None DEFAULT: None

organization_id

Optional organization ID.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
FileAttachment

The uploaded FileAttachment.

RunCreate pydantic-model

RunCreate(**data: Any)

Bases: RunBase, ModelCreate[CreateRunRequest]

Create model for Run.

Fields:

Validators:

  • _validate_time_fields

client_key pydantic-field

client_key: str | None = None

description pydantic-field

description: str | None = None

metadata pydantic-field

metadata: dict[str, str | float | bool] | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

name pydantic-field

name: str

organization_id pydantic-field

organization_id: str | None = None

start_time pydantic-field

start_time: datetime | None = None

stop_time pydantic-field

stop_time: datetime | None = None

tags pydantic-field

tags: list[str] | list[Tag] | None = None

__init_subclass__

__init_subclass__(**kwargs)

to_proto

to_proto() -> ProtoT

Convert to proto.

RunUpdate pydantic-model

RunUpdate(**data: Any)

Bases: RunBase, ModelUpdate[Run]

Update model for Run.

Fields:

Validators:

  • _validate_time_fields

description pydantic-field

description: str | None = None

is_archived pydantic-field

is_archived: bool | None = None

metadata pydantic-field

metadata: dict[str, str | float | bool] | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

name pydantic-field

name: str | None = None

resource_id property writable

resource_id

start_time pydantic-field

start_time: datetime | None = None

stop_time pydantic-field

stop_time: datetime | None = None

tags pydantic-field

tags: list[str] | list[Tag] | None = None

__init_subclass__

__init_subclass__(**kwargs)

to_proto_with_mask

to_proto_with_mask() -> tuple[ProtoT, FieldMask]

Convert to proto with field mask.

Tag pydantic-model

Bases: BaseType[Tag, 'Tag']

Model of the Sift Tag.

Fields:

client property

client: SiftClient

created_by_user_id pydantic-field

created_by_user_id: str

created_date pydantic-field

created_date: datetime

id_ pydantic-field

id_: str | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

name pydantic-field

name: str

proto pydantic-field

proto: Any | None = None

__str__

__str__() -> str

TagCreate pydantic-model

TagCreate(**data: Any)

Bases: TagCreateUpdateBase, ModelCreate[CreateTagRequest]

Create model for Tag.

Fields:

  • _field_helpers_called (set[str])
  • name (str)

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

name pydantic-field

name: str

__init_subclass__

__init_subclass__(**kwargs)

to_proto

to_proto() -> ProtoT

Convert to proto.

TagUpdate pydantic-model

TagUpdate(**data: Any)

Bases: TagCreateUpdateBase, ModelUpdate[Tag]

Update model for Tag.

Fields:

  • _field_helpers_called (set[str])
  • _resource_id (str | None)
  • name (str)

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

name pydantic-field

name: str

resource_id property writable

resource_id

__init_subclass__

__init_subclass__(**kwargs)

to_proto_with_mask

to_proto_with_mask() -> tuple[ProtoT, FieldMask]

Convert to proto with field mask.

TestMeasurement pydantic-model

Bases: BaseType[TestMeasurement, 'TestMeasurement']

TestMeasurement model representing a measurement in a test.

Fields:

boolean_value pydantic-field

boolean_value: bool | None = None

client property

client: SiftClient

id_ pydantic-field

id_: str | None = None

measurement_type pydantic-field

measurement_type: TestMeasurementType

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

name pydantic-field

name: str

numeric_bounds pydantic-field

numeric_bounds: NumericBounds | None = None

numeric_value pydantic-field

numeric_value: float | None = None

passed pydantic-field

passed: bool

proto pydantic-field

proto: Any | None = None

string_expected_value pydantic-field

string_expected_value: str | None = None

string_value pydantic-field

string_value: str | None = None

test_report_id pydantic-field

test_report_id: str | None = None

test_step_id pydantic-field

test_step_id: str

timestamp pydantic-field

timestamp: datetime

unit pydantic-field

unit: str | None = None

update

update(
    update: TestMeasurementUpdate | dict,
    update_step: bool = False,
) -> TestMeasurement

Update the TestMeasurement.

PARAMETER DESCRIPTION
update

The update to apply to the TestMeasurement.

TYPE: TestMeasurementUpdate | dict

update_step

Whether to update the TestStep's status to failed if the TestMeasurement is being updated to failed.

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
TestMeasurement

The updated TestMeasurement.

TestMeasurementCreate pydantic-model

TestMeasurementCreate(**data: Any)

Bases: TestMeasurementBase, ModelCreate[TestMeasurement]

Create model for TestMeasurement.

Fields:

boolean_value pydantic-field

boolean_value: bool | None = None

measurement_type pydantic-field

measurement_type: TestMeasurementType | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

name pydantic-field

name: str

numeric_bounds pydantic-field

numeric_bounds: NumericBounds | None = None

numeric_value pydantic-field

numeric_value: float | None = None

passed pydantic-field

passed: bool

string_expected_value pydantic-field

string_expected_value: str | None = None

string_value pydantic-field

string_value: str | None = None

test_step_id pydantic-field

test_step_id: str

timestamp pydantic-field

timestamp: datetime

unit pydantic-field

unit: str | None = None

__init_subclass__

__init_subclass__(**kwargs)

to_proto

to_proto() -> TestMeasurement

Convert to protobuf message with custom logic.

TestMeasurementType

Bases: Enum

TestMeasurementType enum.

ATTRIBUTE DESCRIPTION
BOOLEAN

DOUBLE

LIMIT

STRING

UNSPECIFIED

BOOLEAN class-attribute instance-attribute

BOOLEAN = 4

DOUBLE class-attribute instance-attribute

DOUBLE = 1

LIMIT class-attribute instance-attribute

LIMIT = 5

STRING class-attribute instance-attribute

STRING = 3

UNSPECIFIED class-attribute instance-attribute

UNSPECIFIED = 0

TestReport pydantic-model

Bases: BaseType[TestReport, 'TestReport'], FileAttachmentsMixin

TestReport model representing a test report.

Fields:

archived_date pydantic-field

archived_date: datetime | None = None

attachments property

attachments: list[FileAttachment]

Get all file attachments for this entity.

RETURNS DESCRIPTION
list[FileAttachment]

A list of FileAttachments associated with this entity.

client property

client: SiftClient

end_time pydantic-field

end_time: datetime

id_ pydantic-field

id_: str | None = None

is_archived pydantic-field

is_archived: bool

metadata pydantic-field

metadata: dict[str, str | float | bool]

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

name pydantic-field

name: str

part_number pydantic-field

part_number: str | None = None

proto pydantic-field

proto: Any | None = None

run_id pydantic-field

run_id: str | None = None

serial_number pydantic-field

serial_number: str | None = None

start_time pydantic-field

start_time: datetime

status pydantic-field

status: TestStatus

steps property

steps: list[TestStep]

Get the TestSteps for the TestReport.

system_operator pydantic-field

system_operator: str | None = None

test_case pydantic-field

test_case: str

test_system_name pydantic-field

test_system_name: str

archive

archive() -> TestReport

Archive the TestReport.

delete_attachment

delete_attachment(
    file_attachment: list[FileAttachment | str]
    | FileAttachment
    | str,
) -> None

Delete one or more file attachments.

PARAMETER DESCRIPTION
file_attachment

A single FileAttachment or list of FileAttachments to delete.

TYPE: list[FileAttachment | str] | FileAttachment | str

unarchive

unarchive() -> TestReport

Unarchive the TestReport.

update

update(update: TestReportUpdate | dict) -> TestReport

Update the TestReport.

upload_attachment

upload_attachment(
    path: str | Path,
    metadata: dict[str, Any] | None = None,
    description: str | None = None,
    organization_id: str | None = None,
) -> FileAttachment

Upload a file attachment to a remote file.

PARAMETER DESCRIPTION
path

The path to the file to upload.

TYPE: str | Path

metadata

Optional metadata for the file (e.g., video/image metadata).

TYPE: dict[str, Any] | None DEFAULT: None

description

Optional description of the file.

TYPE: str | None DEFAULT: None

organization_id

Optional organization ID.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
FileAttachment

The uploaded FileAttachment.

TestReportCreate pydantic-model

TestReportCreate(**data: Any)

Bases: TestReportBase, ModelCreate[CreateTestReportRequest]

Create model for TestReport.

Fields:

end_time pydantic-field

end_time: datetime

metadata pydantic-field

metadata: dict[str, str | float | bool] | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

name pydantic-field

name: str

part_number pydantic-field

part_number: str | None = None

run_id pydantic-field

run_id: str | None = None

serial_number pydantic-field

serial_number: str | None = None

start_time pydantic-field

start_time: datetime

status pydantic-field

status: TestStatus | None = None

system_operator pydantic-field

system_operator: str | None = None

test_case pydantic-field

test_case: str

test_system_name pydantic-field

test_system_name: str

__init_subclass__

__init_subclass__(**kwargs)

to_proto

to_proto() -> CreateTestReportRequest

Convert to protobuf message with custom logic.

TestReportUpdate pydantic-model

TestReportUpdate(**data: Any)

Bases: TestReportBase, ModelUpdate[TestReport]

Update model for TestReport.

Fields:

end_time pydantic-field

end_time: datetime | None = None

is_archived pydantic-field

is_archived: bool | None = None

metadata pydantic-field

metadata: dict[str, str | float | bool] | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

name pydantic-field

name: str | None = None

part_number pydantic-field

part_number: str | None = None

resource_id property writable

resource_id

run_id pydantic-field

run_id: str | None = None

serial_number pydantic-field

serial_number: str | None = None

start_time pydantic-field

start_time: datetime | None = None

status pydantic-field

status: TestStatus | None = None

system_operator pydantic-field

system_operator: str | None = None

test_case pydantic-field

test_case: str | None = None

test_system_name pydantic-field

test_system_name: str | None = None

__init_subclass__

__init_subclass__(**kwargs)

to_proto_with_mask

to_proto_with_mask() -> tuple[ProtoT, FieldMask]

Convert to proto with field mask.

TestStatus

Bases: Enum

TestStatus enum.

ATTRIBUTE DESCRIPTION
ABORTED

DRAFT

ERROR

FAILED

IN_PROGRESS

PASSED

SKIPPED

UNSPECIFIED

ABORTED class-attribute instance-attribute

ABORTED = 4

DRAFT class-attribute instance-attribute

DRAFT = 1

ERROR class-attribute instance-attribute

ERROR = 5

FAILED class-attribute instance-attribute

FAILED = 3

IN_PROGRESS class-attribute instance-attribute

IN_PROGRESS = 6

PASSED class-attribute instance-attribute

PASSED = 2

SKIPPED class-attribute instance-attribute

SKIPPED = 7

UNSPECIFIED class-attribute instance-attribute

UNSPECIFIED = 0

TestStep pydantic-model

Bases: BaseType[TestStep, 'TestStep']

TestStep model representing a step in a test.

Fields:

client property

client: SiftClient

description pydantic-field

description: str | None = None

end_time pydantic-field

end_time: datetime

error_info pydantic-field

error_info: ErrorInfo | None = None

id_ pydantic-field

id_: str | None = None

measurements property

measurements: list[TestMeasurement]

Get the TestMeasurements for the TestStep.

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=True)

name pydantic-field

name: str

parent_step_id pydantic-field

parent_step_id: str | None = None

proto pydantic-field

proto: Any | None = None

start_time pydantic-field

start_time: datetime

status pydantic-field

status: TestStatus

step_path pydantic-field

step_path: str

step_type pydantic-field

step_type: TestStepType

test_report_id pydantic-field

test_report_id: str

update

update(update: TestStepUpdate | dict) -> TestStep

Update the TestStep.

TestStepCreate pydantic-model

TestStepCreate(**data: Any)

Bases: TestStepBase, ModelCreate[TestStep]

Create model for TestStep.

Fields:

description pydantic-field

description: str | None = None

end_time pydantic-field

end_time: datetime

error_info pydantic-field

error_info: ErrorInfo | None = None

model_config class-attribute instance-attribute

model_config = ConfigDict(frozen=False)

name pydantic-field

name: str

parent_step_id pydantic-field

parent_step_id: str | None = None

start_time pydantic-field

start_time: datetime

status pydantic-field

status: TestStatus

step_path pydantic-field

step_path: str

step_type pydantic-field

step_type: TestStepType

test_report_id pydantic-field

test_report_id: str

__init_subclass__

__init_subclass__(**kwargs)

to_proto

to_proto() -> TestStep

Convert to protobuf message with custom logic.

TestStepType

Bases: Enum

TestStepType enum.

ATTRIBUTE DESCRIPTION
ACTION

FLOW_CONTROL

GROUP

SEQUENCE

UNSPECIFIED

ACTION class-attribute instance-attribute

ACTION = 3

FLOW_CONTROL class-attribute instance-attribute

FLOW_CONTROL = 4

GROUP class-attribute instance-attribute

GROUP = 2

SEQUENCE class-attribute instance-attribute

SEQUENCE = 1

UNSPECIFIED class-attribute instance-attribute

UNSPECIFIED = 0