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:
- namestr
The name of this format.
- encodingstr, 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.- newlinestr, optional
What the default newline handling of this format is. Default is to use universal newline handling.
Attributes
Return True if this is a binary format.
The name of this format.
Dictionary that maps classes to their readers for this format.
The sniffer function associated with this format.
Dictionary that maps classes to their writers for this format.
Methods
Decorate a function to act as the reader for a class in this format.
Decorate a function to act as the sniffer for this format.
Decorate a function to act as the writer for a class in this format.
Special methods (inherited)
__eq__Return self==value.
__ge__Return self>=value.
__getstate__Helper for pickle.
__gt__Return self>value.
__hash__Return hash(self).
__le__Return self<=value.
__lt__Return self<value.
__ne__Return self!=value.
__str__Return str(self).
Details
- is_binary_format#
Return True if this is a binary format.
- name#
The name of this format.
- readers#
Dictionary that maps classes to their readers for this format.
- sniffer_function#
The sniffer function associated with this format.
- writers#
Dictionary that maps classes to their writers for this format.