2 # -*- coding: utf-8 -*-
8 return isinstance(value, bool)
10 def is_integer(value):
11 return isinstance(value, int)
14 return isinstance(value, str)
16 def is_ip4_address(value):
23 def is_ip6_address(value):
30 def is_mac_address(value):
31 regex = r'^([0-9a-zA-Z]{0,2}:)*[0-9a-zA-Z]{0,2}'
32 found = re.search(regex, value)
33 if not found or value.count(':') != 5: