dip.io.default_io_manager¶
The dip.io.default_io_manager module contains dip’s default
i/o manager implementation.
IoManager¶
-
class
dip.io.default_io_manager.IoManager¶ Base class:
ModelThe IoManager class is the default implementation of the
IIoManagerinterface.-
read(model, location, format)¶ Read a model from a location using a particular format.
Parameters: - model – is the model.
- location – is the location as a string. This should identify a valid and unambiguous storage location.
- format – is the format.
Returns: the read model. This may be the original model populated from the storage location, or it may be a different model (of an appropriate type) created from the storage location. If
Noneis returned then it is assumed that the read was abandoned and the user informed appropriately.
-
readable_locations_from_string(location, format='')¶ Get the list of readable storage location instances for which a location specified as a string is valid.
Parameters: - location – is the location as a string.
- format – is the identifier of the optional format.
Returns: the list of storage location instances.
-
readable_storage(format='')¶ Get the list of the storage instances that can be read from using a particular format.
Parameters: format – is the identifier of the optional format. Returns: the list of storage instances.
-
write(model, location, format)¶ Write a model to a location using a particular format.
Parameters: - model – is the model.
- location – is the location as a string. This should identify a valid and unambiguous storage location.
- format – is the format.
-
writeable_locations_from_string(location, format='')¶ Get the list of writeable storage location instances for which a location specified as a string is valid.
Parameters: - location – is the location as a string.
- format – is the identifier of the optional format.
Returns: the list of storage location instances.
-
writeable_storage(format='')¶ Get the list of the storage instances that can be written to using a particular format.
Parameters: format – is the identifier of the optional format. Returns: the list of storage instances.
-