, format, into, mode='w', **kwargs)[source]

Write a supported skbio file format from an instance or a generator.

This function is able to reference and execute all registered write operations in skbio.


obj : object

The object must have a registered writer for a provided format.

format : str

The format must be a registered format name with a writer for the given obj.

into : filepath or filehandle

The location to write the given format from obj into. Filepaths are automatically closed when written; filehandles are the responsibility of the caller.

mode : str, optional

The write mode. This is passed to open(fp, mode) internally. Default is ‘w’.

kwargs : dict, optional

Will be passed directly to the appropriate writer.


Raised when a writer could not be found for the given format and obj.