HoloviewsWriter¶
HoloviewsWriter saves Holoviews objects to image file(s) in an underlying filesystem (e.g. local, S3, GCS).
kedro_datasets.holoviews.HoloviewsWriter ¶
HoloviewsWriter(
*,
filepath,
fs_args=None,
credentials=None,
save_args=None,
version=None,
metadata=None
)
Bases: AbstractVersionedDataset[HoloViews, NoReturn]
HoloviewsWriter saves Holoviews objects to image file(s) in an underlying
filesystem (e.g. local, S3, GCS).
Examples:
Using the Python API:
>>> import holoviews as hv
>>> from kedro_datasets.holoviews import HoloviewsWriter
>>>
>>> curve = hv.Curve(range(10))
>>>
>>> holoviews_writer = HoloviewsWriter(filepath=tmp_path / "holoviews")
>>> holoviews_writer.save(curve)
Parameters:
-
filepath(str | PathLike) –Filepath in POSIX format to a text file prefixed with a protocol like
s3://. If prefix is not provided,fileprotocol (local filesystem) will be used. The prefix should be any protocol supported byfsspec. Note:http(s)doesn't support versioning. Can be a string or a PathLike object. -
fs_args(dict[str, Any] | None, default:None) –Extra arguments to pass into underlying filesystem class constructor (e.g.
{"project": "my-project"}forGCSFileSystem), as well as to pass to the filesystem'sopenmethod through nested keyopen_args_save. Here you can find all available arguments foropen: https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.open All defaults are preserved, exceptmode, which is set towbwhen saving. -
credentials(dict[str, Any] | None, default:None) –Credentials required to get access to the underlying filesystem. E.g. for
S3FileSystemit should look like:{'key': '<id>', 'secret': '<key>'}} -
save_args(dict[str, Any] | None, default:None) –Extra save args passed to
holoviews.save(). See https://holoviews.org/reference_manual/holoviews.util.html#holoviews.util.save -
version(Version | None, default:None) –If specified, should be an instance of
kedro.io.core.Version. If itsloadattribute is None, the latest version will be loaded. If itssaveattribute is None, save version will be autogenerated. -
metadata(dict[str, Any] | None, default:None) –Any arbitrary metadata. This is ignored by Kedro, but may be consumed by users or external plugins.
Source code in kedro_datasets/holoviews/holoviews_writer.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
_describe ¶
_describe()
Source code in kedro_datasets/holoviews/holoviews_writer.py
106 107 108 109 110 111 112 | |
_exists ¶
_exists()
Source code in kedro_datasets/holoviews/holoviews_writer.py
127 128 129 | |
_invalidate_cache ¶
_invalidate_cache()
Invalidate underlying filesystem caches.
Source code in kedro_datasets/holoviews/holoviews_writer.py
135 136 137 138 | |
_release ¶
_release()
Source code in kedro_datasets/holoviews/holoviews_writer.py
131 132 133 | |
load ¶
load()
Source code in kedro_datasets/holoviews/holoviews_writer.py
114 115 | |
save ¶
save(data)
Source code in kedro_datasets/holoviews/holoviews_writer.py
117 118 119 120 121 122 123 124 125 | |