betty.machine_name module¶
Machine names.
- final exception betty.machine_name.InvalidMachineName¶
Bases:
HumanFacingException,ValueErrorRaised when something is not a valid machine name.
- final class betty.machine_name.MachineName¶
Bases:
Portable[str],str,DataA machine name.
A machine name is a string that meets these criteria: - At most 250 characters long. - Lowercase letters, numbers, and hyphens (-).
- dump() str¶
Dump the instance to portable data.
- Raises:
betty.portable.error.NotPortable – Raised if any part of the data is not portable.
- classmethod load(portable: PortableData, /) Self¶
Create a new instance from portable data.
- Raises:
betty.exception.HumanFacingException – Raised if the portable data is invalid.
- classmethod machinify(source: str, /) Self | None¶
Attempt to convert a source string into a valid machine name.
- classmethod resolve(machine_name: ResolvableMachineName) MachineName¶
Resolve a value to a machine name.