Skip to main content

Module run

Module run 

Source

Structsยง

CloseRunInlineRequest ๐Ÿ”’
Payload for RunFinishInline: remaining samples sent as a raw CSV string. Used when no S3 batches were uploaded (short runs or all S3 failures).
CloseRunS3Request ๐Ÿ”’
Payload for RunFinishS3: data was already uploaded to S3 in batches. Used when at least one S3 batch was successfully uploaded. The final remaining samples must have been flushed to S3 before calling close_run (the BatchUploader performs this flush on shutdown).
MetadataPayload ๐Ÿ”’
RawCredentials ๐Ÿ”’
Field names match the live Sentinel API response (Python reference: sentinel_api.py register_run docstring). expiration is the documented Python name; expires_at is accepted as an alias in case the live API uses a different casing. The field is optional so a missing value does not abort the run โ€“ it falls back to a far-future timestamp (credentials treated as always-fresh).
RefreshCredentialsResponse ๐Ÿ”’
RunContext
State returned by start_run and referenced by all subsequent API calls.
StartRunRequest ๐Ÿ”’
Python register_run sends a flat dict merging metadata, host_info, and cloud_info. #[serde(flatten)] on all three fields reproduces that shape.
StartRunResponse ๐Ÿ”’

Functionsยง

close_run
POST to /runs/{run_id}/finish to mark the run complete.
days_since_epoch ๐Ÿ”’
Days from 1970-01-01 to the given date (Gregorian, valid 1970โ€“2099).
now_iso8601 ๐Ÿ”’
parse_iso8601_secs ๐Ÿ”’
Parse a subset of ISO 8601 UTC timestamps into Unix seconds. Handles the common AWS format "YYYY-MM-DDTHH:MM:SSZ".
refresh_credentials
POST to /runs/{run_id}/credentials/refresh to obtain fresh STS credentials.
slice_is_empty ๐Ÿ”’
start_run
POST to /runs to register a new run with the Sentinel API.
unix_secs_to_iso8601 ๐Ÿ”’
Format a Unix timestamp as an ISO 8601 UTC string ("YYYY-MM-DDTHH:MM:SSZ"). Accurate for 1970-2199.