Skip to main content

conbytes

A wrapper around bytes that allows for additional constraints.

def conbytes(
min_length: int | None = None,
max_length: int | None = None,
strict: bool | None = None
) - > type[bytes]

A wrapper around bytes that allows for additional constraints.

Parameters

NameTypeDescription
min_length`intNone` = None
max_length`intNone` = None
strict`boolNone` = None

Returns

TypeDescription
type[bytes]The wrapped bytes type.