pynetdicom.utils.set_ae¶
- pynetdicom.utils.set_ae(value: Optional[str], name: str, allow_empty: bool = True, allow_none: bool = True) Optional[str] ¶
Convert value to an AE like parameter and apply validation.
- Parameters:
value (str or None) – The value to be converted.
name (str) – The name of the parameter being converted.
allow_empty (bool, optional) – If
True
(default) skip validation when an empty string orNone
is used.
- Returns:
If
allow_empty
isTrue
then may returnNone
, otherwise the string will be returned.- Return type:
str or None