Skip to content

Timenet.progress

timenet.progress source

Progress events for copying and building releases.

Each release starts with a :class:StepStarted event. A :class:StepFinished event follows only if the copy or build succeeds.

ProgressCallback module-attribute source

ProgressCallback = Callable[[ProgressEvent], None]

A callback that receives a progress event and returns nothing.

ProgressEvent module-attribute source

ProgressEvent = (
    StepStarted | StepFinished | BytesMoved | ShardWritten
)

A step, transfer, or shard progress event.

BytesMoved dataclass source

The byte count for a transfer in progress.

Attributes:

Name Type Description
subject str

What moves: a source or target URL, or a copied release ID such as "org/name@1.0.0".

done int

The bytes moved so far.

total int | None

The total byte count, or None if unknown.

done instance-attribute source

done: int

subject instance-attribute source

subject: str

total instance-attribute source

total: int | None

ShardWritten dataclass source

The number of completed shards in a release build.

Attributes:

Name Type Description
release DatasetRef

The release being built.

count int

The number of shards written so far.

count instance-attribute source

count: int

release instance-attribute source

release: DatasetRef

StepFinished dataclass source

The successful completion of a copy or build for one release.

Attributes:

Name Type Description
release DatasetRef

The copied or built release.

action Literal['copy', 'build']

The completed operation, either "copy" or "build".

action instance-attribute source

action: Literal['copy', 'build']

release instance-attribute source

release: DatasetRef

StepStarted dataclass source

The start of a copy or build for one release.

Attributes:

Name Type Description
release DatasetRef

The release to copy or build.

action Literal['copy', 'build']

The operation, either "copy" or "build".

action instance-attribute source

action: Literal['copy', 'build']

release instance-attribute source

release: DatasetRef