is_serialisable

is_serialisable#

eoio.serialisation.codecs.is_serialisable(value: Any) → bool[source]#

Report whether a value can be written as an attribute without any encoding.

Grounded in what xarray/netCDF4 actually accepts rather than what looks reasonable: bool and None are rejected outright by the netCDF4 backend, and a mixed-type list such as [1, "a"] is silently coerced to ['1', 'a'], so neither is treated as safe here.

Parameters:

value – Attribute value.

Returns:

True when the value can be stored as-is.