sandplover.io.BaseIO¶
- class sandplover.io.BaseIO(io_type)¶
BaseIO object other file format wrappers inheririt from.
Note
This is an abstract class and cannot be instantiated directly. If you wish to subclass to create a new IO format, you must implement several methods.
To create an IO format for data already loaded into memory, you can subclass BaseIO directly, and you just need to implement the __getitem__ method and keys attribute.
To create an IO format that reads data from disk, you should subclass FileIO, and implement the required methods __getitem__, connect, read, and write, and the keys attribute.
- __init__(io_type)¶
Initialize the base IO.
Methods
__init__(io_type)Initialize the base IO.
Attributes
auxShould link to all key _names_ available in dataio layer.
Variables known to the dataio layer
alias for backwards compatability
- abstractmethod __getitem__()¶
Should slice the data from underlying data.
Must be implemented to appropriately slice from file, dict, folder structure etc. Must be implemented to appropriately search underlying data variables and variables in
_in_memory_dataduring slice.
- abstract property keys¶
Should link to all key _names_ available in dataio layer.
- property known_variables¶
Variables known to the dataio layer
Includes underlying data variables and registered variables.
- property meta¶
alias for backwards compatability