Network Addresses¶
- class typerighter.types.net.EmailType(*a, **kw)[source]¶
- NATIVE¶
alias of
str
- is_coercible(value)¶
Checks a value for whether or not it can be converted to the correct type. Falls back to the stricter is_type_match if self.strict is True.
- Parameters
value (object) – The value to inspect
- is_falsy(value)¶
Checks a value and responds saying whether the Type considers it falsy.
- Parameters
value (object) – The value to inspect
- Returns
True or False
- is_type_match(value)¶
Checks if a value is an instance of this Type’s native type. :param object value: The value to inspect
- to_native(value)¶
Converts a value to the native form of this type
- Parameters
value (object) – The value to convert
- to_primitive(value)¶
Converts a value to the primitive form of this type
- Parameters
value (object) – The value to convert
- to_schematic()¶
Returns a Type’s Schematic
- validate_choices(value)¶
Checks if a choices list has been set and then if value is in that list.
- class typerighter.types.net.IPAddressType(*a, **kw)[source]¶
- NATIVE¶
alias of
str
- is_coercible(value)¶
Checks a value for whether or not it can be converted to the correct type. Falls back to the stricter is_type_match if self.strict is True.
- Parameters
value (object) – The value to inspect
- is_falsy(value)¶
Checks a value and responds saying whether the Type considers it falsy.
- Parameters
value (object) – The value to inspect
- Returns
True or False
- is_type_match(value)¶
Checks if a value is an instance of this Type’s native type. :param object value: The value to inspect
- to_native(value)¶
Converts a value to the native form of this type
- Parameters
value (object) – The value to convert
- to_primitive(value)¶
Converts a value to the primitive form of this type
- Parameters
value (object) – The value to convert
- to_schematic()¶
Returns a Type’s Schematic
- validate_choices(value)¶
Checks if a choices list has been set and then if value is in that list.
- class typerighter.types.net.IPv4Type(*a, **kw)[source]¶
- NATIVE¶
alias of
str
- is_coercible(value)¶
Checks a value for whether or not it can be converted to the correct type. Falls back to the stricter is_type_match if self.strict is True.
- Parameters
value (object) – The value to inspect
- is_falsy(value)¶
Checks a value and responds saying whether the Type considers it falsy.
- Parameters
value (object) – The value to inspect
- Returns
True or False
- is_type_match(value)¶
Checks if a value is an instance of this Type’s native type. :param object value: The value to inspect
- to_native(value)¶
Converts a value to the native form of this type
- Parameters
value (object) – The value to convert
- to_primitive(value)¶
Converts a value to the primitive form of this type
- Parameters
value (object) – The value to convert
- to_schematic()¶
Returns a Type’s Schematic
- validate_choices(value)¶
Checks if a choices list has been set and then if value is in that list.
- class typerighter.types.net.IPv6Type(*a, **kw)[source]¶
- NATIVE¶
alias of
str
- is_coercible(value)¶
Checks a value for whether or not it can be converted to the correct type. Falls back to the stricter is_type_match if self.strict is True.
- Parameters
value (object) – The value to inspect
- is_falsy(value)¶
Checks a value and responds saying whether the Type considers it falsy.
- Parameters
value (object) – The value to inspect
- Returns
True or False
- is_type_match(value)¶
Checks if a value is an instance of this Type’s native type. :param object value: The value to inspect
- to_native(value)¶
Converts a value to the native form of this type
- Parameters
value (object) – The value to convert
- to_primitive(value)¶
Converts a value to the primitive form of this type
- Parameters
value (object) – The value to convert
- to_schematic()¶
Returns a Type’s Schematic
- validate_choices(value)¶
Checks if a choices list has been set and then if value is in that list.
- class typerighter.types.net.MACAddressType(*a, **kw)[source]¶
- NATIVE¶
alias of
str
- is_coercible(value)¶
Checks a value for whether or not it can be converted to the correct type. Falls back to the stricter is_type_match if self.strict is True.
- Parameters
value (object) – The value to inspect
- is_falsy(value)¶
Checks a value and responds saying whether the Type considers it falsy.
- Parameters
value (object) – The value to inspect
- Returns
True or False
- is_type_match(value)¶
Checks if a value is an instance of this Type’s native type. :param object value: The value to inspect
- to_native(value)¶
Converts a value to the native form of this type
- Parameters
value (object) – The value to convert
- to_primitive(value)¶
Converts a value to the primitive form of this type
- Parameters
value (object) – The value to convert
- to_schematic()¶
Returns a Type’s Schematic
- validate_choices(value)¶
Checks if a choices list has been set and then if value is in that list.
- class typerighter.types.net.URLType(*a, **kw)[source]¶
- NATIVE¶
alias of
str
- is_coercible(value)¶
Checks a value for whether or not it can be converted to the correct type. Falls back to the stricter is_type_match if self.strict is True.
- Parameters
value (object) – The value to inspect
- is_falsy(value)¶
Checks a value and responds saying whether the Type considers it falsy.
- Parameters
value (object) – The value to inspect
- Returns
True or False
- is_type_match(value)¶
Checks if a value is an instance of this Type’s native type. :param object value: The value to inspect
- to_native(value)¶
Converts a value to the native form of this type
- Parameters
value (object) – The value to convert
- to_primitive(value)¶
Converts a value to the primitive form of this type
- Parameters
value (object) – The value to convert
- to_schematic()¶
Returns a Type’s Schematic
- validate_choices(value)¶
Checks if a choices list has been set and then if value is in that list.