tecio.TecplotAuxDataReader#

class tecio.TecplotAuxDataReader#

Bases: Mapping[str, str], ABC

Read-only view of one Tecplot auxiliary-data mapping.

Backs dataset-, zone-, and variable-level auxiliary data for all three formats. Subclasses supply the underlying {name: value} mapping through _load_data(), called at most once, on first access, and cached for the life of the object.

Implements collections.abc.Mapping, so get, keys, values, items, __contains__, and in all work without being redefined here.

Note

A concrete subclass must call super().__init__() first, then store any private fields it needs (the data source to lazily load from) with object.__setattr__, the same contract as TecplotZoneReader and TecplotVariableReader.

Methods

as_bool(key[, default])

Return the value for key as bool, or default on failure.

as_float(key[, default])

Return the value for key as float, or default on failure.

as_int(key[, default])

Return the value for key as int, or default on failure.

get(k[,d])

items()

Return the (name, value) pairs.

keys()

Return the auxiliary data names.

values()

Return the auxiliary data values.

as_bool(key, default=None)[source]#

Return the value for key as bool, or default on failure.

Recognizes true/t/yes/y/1 as True and false/f/no/n/0 as False, case-insensitively.

as_float(key, default=None)[source]#

Return the value for key as float, or default on failure.

as_int(key, default=None)[source]#

Return the value for key as int, or default on failure.

items()[source]#

Return the (name, value) pairs.

keys()[source]#

Return the auxiliary data names.

values()[source]#

Return the auxiliary data values.