class documentation

class LoadResult:

View In Hierarchy

The outcome of Gateway.load_data.

Each reported entity's index is its position in its class's data file, so entities without an id can still be located.

Instance Variable class_errors Per class, the exception that stopped its file being loaded at all (e.g. a json.JSONDecodeError for invalid JSON, or a ValueError for a malformed entity id).
Instance Variable failed Per class, the entities that were not written and why (see FailedWrite.rejected for which need correcting).
Instance Variable loaded The number of entities confirmed as written.
Instance Variable remaining The classes not attempted because the load stopped early, in the order they would have been loaded. Only a result attached to an AuthenticationError or TokenRequestError has any.
Instance Variable skipped Per class, why it was not loaded: no data file, an empty one, or (for a single requested class) no dataset. Base classes, whose data loads via their subclasses, are not included.
Instance Variable timed_out Per class, the entities whose write timed out and may or may not have completed (see PutResult.timed_out for how to verify them before reloading).
Instance Variable unsent Per class, the entities not written because the load stopped early on an AuthenticationError or TokenRequestError (see PutResult.unsent). Only a result attached to such an error (as its result) has any.
Property failed_count The total number of entities that were not written.
Property ok True when every entity found was confirmed as written.
Property timed_out_count The total number of entities whose write timed out.
Property unsent_count The total number of entities not written because the load stopped early.
class_errors: dict[str, Exception] =

Per class, the exception that stopped its file being loaded at all (e.g. a json.JSONDecodeError for invalid JSON, or a ValueError for a malformed entity id).

failed: dict[str, list[FailedWrite]] =

Per class, the entities that were not written and why (see FailedWrite.rejected for which need correcting).

loaded: int =

The number of entities confirmed as written.

remaining: list[str] =

The classes not attempted because the load stopped early, in the order they would have been loaded. Only a result attached to an AuthenticationError or TokenRequestError has any.

skipped: dict[str, SkippedClass] =

Per class, why it was not loaded: no data file, an empty one, or (for a single requested class) no dataset. Base classes, whose data loads via their subclasses, are not included.

timed_out: dict[str, list[TimedOutWrite]] =

Per class, the entities whose write timed out and may or may not have completed (see PutResult.timed_out for how to verify them before reloading).

unsent: dict[str, list[UnsentWrite]] =

Per class, the entities not written because the load stopped early on an AuthenticationError or TokenRequestError (see PutResult.unsent). Only a result attached to such an error (as its result) has any.

@property
failed_count: int =

The total number of entities that were not written.

@property
ok: bool =

True when every entity found was confirmed as written.

Skipped classes do not affect this: a class with no data file has nothing to load.

@property
timed_out_count: int =

The total number of entities whose write timed out.

@property
unsent_count: int =

The total number of entities not written because the load stopped early.