Utilities (pynetdicom.utils)

This module provides utilities.


Return the decoded string from encoded_value.


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.


Return True if uid is considered valid.