roboto.file_infra.upload_transaction#

Module Contents#

class roboto.file_infra.upload_transaction.BeginManifestTransactionRequest(/, **data)#

Bases: pydantic.BaseModel

Request payload to begin a manifest-based transaction

Parameters:

data (Any)

device_id: str | None = None#

The ID of the device which created this dataset, if applicable.

origination: str#

Additional information about what uploaded the file, e.g. roboto client v1.0.0.

resource_manifest: dict[str, int]#

Dictionary mapping destination file paths to file sizes in bytes.

class roboto.file_infra.upload_transaction.BeginManifestTransactionResponse(/, **data)#

Bases: pydantic.BaseModel

Response to a manifest-based transaction request

Parameters:

data (Any)

transaction_id: str#
upload_mappings: dict[str, str]#
class roboto.file_infra.upload_transaction.ReportTransactionProgressRequest(/, **data)#

Bases: pydantic.BaseModel

Request payload for reporting file upload transaction progress.

Used to notify the platform about the completion status of individual files within a batch upload transaction. This enables progress tracking and partial completion handling for large file uploads.

Parameters:

data (Any)

manifest_items: list[str]#

List of manifest item identifiers that have completed upload.

class roboto.file_infra.upload_transaction.RobotoCredentials(/, **data)#

Bases: pydantic.BaseModel

Credentials returned from the Roboto Platform

Parameters:

data (Any)

access_key_id: str#
expiration: datetime.datetime#
region: str#
secret_access_key: str#
session_token: str#
to_upload_credentials()#
Return type:

roboto.file_infra.object_store.Credentials

class roboto.file_infra.upload_transaction.TransactionFile#

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

destination_path: str#
file_size: int#
local_path: pathlib.Path#
class roboto.file_infra.upload_transaction.UploadTransaction(items, association, device_id=None, origination=None, batch_size=None, roboto_client=None, caller_org_id=None)#
Parameters:
property completed_upload_node_ids: list[str]#
Return type:

list[str]

property credential_provider: roboto.file_infra.object_store.CredentialProvider#
Return type:

roboto.file_infra.object_store.CredentialProvider

property transaction_id: str#
Return type:

str

property upload_mappings: dict[str, str]#
Return type:

dict[str, str]

class roboto.file_infra.upload_transaction.UploadableFile#

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

destination_path: str#
local_path: pathlib.Path#
upload_uri: str#