number = 16777216 * IP[0] + 65536 * IP[1] + 256 * IP[2] + IP[3]
# Check for valid IPv4 address: |
Lowest allowed address; accepts: str, e.g., 192.168.0.1; iterable of numbers, e.g., [192, 168, 0, 1]; int, e.g., 3232235521
requires = IS_IPV4(minip='192.168.0.1')
Highest allowed address; accepts: str, e.g., 192.168.0.1; iterable of numbers, e.g., [192, 168, 0, 1]; int, e.g., 3232235521
requires = IS_IPV4(maxip='192.168.255.255')
" Web2py Book"