int3.format

class int3.format.format_style.FormatStyle(*values)

Style to use for formatting text.

static from_str(format_style_name: str) FormatStyle

Factory method to create an instance from a string name.

static names() list[str]

Get all supported format style names.

class int3.format.formatter.Formatter(style_in: FormatStyle, style_out: FormatStyle, width: int = 88)

Raw data formatter.

format(data: bytes) bytes

Format data of an input style into an output style.

>>> from int3 import FormatStyle, Formatter
>>> formatter = Formatter(
...     style_in=FormatStyle.Raw, style_out=FormatStyle.Hex
... )
>>> formatter.format(b"AAAA")
b'41414141'