spmi.utils.io.ios package#
Submodules#
spmi.utils.io.ios.jsonio module#
Provides class JsonIo
.
- class spmi.utils.io.ios.jsonio.JsonIo(path)#
Bases:
Io
JSON formatted io.
- Parameters:
path (
pathlib.Path
) – Path to file.- Raises:
TypeError –
- copy()#
Return a copy.
- dump(data)#
Dump.
- Parameters:
data (
dict
) – Dictionary to dump.- Raises:
- load()#
Load.
- Returns:
dict
. File representation as dict.- Raises:
- exception spmi.utils.io.ios.jsonio.JsonIoException#
Bases:
IoException
spmi.utils.io.ios.tomlio module#
Provides class TomlIo
.
- class spmi.utils.io.ios.tomlio.TomlIo(path)#
Bases:
Io
TOML formatted io.
- Parameters:
path (
pathlib.Path
) – Path to file.- Raises:
TypeError –
- copy()#
Return a copy.
- dump(data)#
Dump.
- Parameters:
data (
dict
) – Dictionary to dump.- Raises:
- load()#
Load.
- Returns:
dict
. File representation as dict.- Raises:
- exception spmi.utils.io.ios.tomlio.TomlIoException#
Bases:
IoException
spmi.utils.io.ios.yamlio module#
Provides class YamlIo
.
- class spmi.utils.io.ios.yamlio.YamlIo(path)#
Bases:
Io
Yaml formatted io.
- Parameters:
path (
pathlib.Path
) – Path to file.- Raises:
TypeError –
- copy()#
Return a copy.
- dump(data)#
Dump.
- Parameters:
data (
dict
) – Dictionary to dump.- Raises:
- load()#
Load.
- Returns:
dict
. File representation as dict.- Raises:
- exception spmi.utils.io.ios.yamlio.YamlIoException#
Bases:
IoException