Data type APIs

Sympathy stores data internally as a few different data types. Learning how to use the APIs for those data types is essential when writing your own nodes or when using the F(x) nodes.

Built in Types

The built in types are all subclasses of sygroup:

class sygroup(container_type)

Abstract base class for builtin types.

create()

Return a new sygroup, not connected to any file. The same container type is used for the new sygroup.

source(other, shallow=False):

Fill with elements from other sygroup.

__copy__():

Return a shallow copy.

__deepcopy__(memo=None):

Return a deep copy.

Methods and fields that are not documented can be considered internal and should not be used in third party nodes.

The following builtin container types are available.

Built in TypeAliases

The built in typealiases are all subclasses of TypeAlias:

class sympathy.api.typeutil.TypeAlias(fileobj=None, data=None, filename=None, mode='r', scheme='hdf5', source=None, managed=False, import_links=False)[source]
__deepcopy__(memo=None)[source]

Return new TypeAlias that does not share references with self. Must be re-implemented by subclasses that define their own storage fields.

classmethod icon()[source]

Return full path to svg icon.

init()[source]

Perform any initialization, such as, defining local fields.

names(kind=None, **kwargs)[source]

Return relevant names. Useful if this type has some kind of names that would be useful in adjust_parameters.

source(other, shallow=False)[source]

Update self with the data from other, without keeping the old state. When shallow is False (default), self should be updated with a deepcopy of other.

self and other must be of the exact same type.

sync()[source]

Synchronize data fields that are kept in memory against self._data.

Called before data is written to disk and must be re-implemented by subclasses that define custom storage fields.

classmethod viewer()[source]

Return viewer class, which must be a subclass of sympathy.api.typeutil.ViewerBase

Methods and fields that are not documented can be considered internal and should not be used in third party nodes.

The following builtin type aliases.