Utilities (pynetdicom.utils)

This module provides utilities.

decode_bytes(encoded_value)

Return the decoded string from encoded_value.

make_target(target_fn)

Wraps target_fn in a thunk that passes all contextvars from the current context.

pretty_bytes(bytestream[, prefix, ...])

Turn the bytestring bytestream into a list of nicely formatted str.

set_ae(value, name[, allow_empty, allow_none])

Convert value to an AE like parameter and apply validation.

set_uid(value, name[, allow_empty, ...])

Convert value to a UID and apply validation.

validate_uid(uid)

Return True if uid is considered valid.