register_writer

astropy.io.registry.register_writer(data_format, data_class, function, force=False, priority=0)

Register a table writer function.

Parameters:
data_formatpython:str

The data format identifier. This is the string that will be used to specify the data type when writing.

data_classclass

The class of the object that can be written.

functionpython:function

The function to write out a data object.

forcebool, optional

Whether to override any existing function if already present. Default is False.

prioritypython:int, optional

The priority of the writer, used to compare possible formats when trying to determine the best writer to use. Higher priorities are preferred over lower priorities, with the default priority being 0 (negative numbers are allowed though).