skbio.io.registry.Format¶
- class skbio.io.registry.Format(name, encoding=None, newline=None)[source]¶
Defines a format on which readers/writers/sniffer can be registered.
- Parameters:
name (str) – The name of this format.
encoding (str, optional) – What the default encoding of this format is. If set to ‘binary’ then all registered handlers will receive an
io.BufferedReaderorio.BufferedWriterinstead of anio.TextIOBase. The user will also be unable to override the encoding in that case.newline (str, optional) – What the default newline handling of this format is. Default is to use universal newline handling.
Attributes
is_binary_formatReturn True if this is a binary format.
monkey_patched_readersSet of classes bound to readers to monkey patch.
monkey_patched_writersSet of classes bound to writers to monkey patch.
nameThe name of this format.
readersDictionary that maps classes to their readers for this format.
sniffer_functionThe sniffer function associated with this format.
writersDictionary that maps classes to their writers for this format.
Built-ins
Helper for pickle.
__hash__()Return hash(self).
Methods
reader(cls[, monkey_patch, override])Decorate a function to act as the reader for a class in this format.
sniffer([override])Decorate a function to act as the sniffer for this format.
writer(cls[, monkey_patch, override])Decorate a function to act as the writer for a class in this format.