Serialization Framework (pyncbitk.serial)#

class pyncbitk.serial.Serial#

Abstract base class for objects part of the serialization framework.

__eq__(value, /)#

Return self==value.

dumps(format='asntext', indent=True, eol=True)#

Dump the object to a byte string.

Parameters:
  • format (str) – The serialization format to use. Supported formats are asntext, asnbinary, xml and json.

  • indent (bool) – Whether to indent each line in the output. Defaults to True.

  • eol (bool) – Whether to add newlines in textual formats. eol=False implies indent=False.

Returns:

bytes – The serialized object.