Tag Archives: ipaddress

[python]Making a list of dictionaries

Use case I am trying to write a script for doing security group based on user’s input. the IpRanges is a list of dictionary. I intend to do a method which generate multiple dictionaries with the same key but different … Continue reading

Posted in Python, Scripting | Tagged , , | Leave a comment

[python]Extension to validate ip address

On previous post I have written a sample code to validate ip address using the ipaddress module. The sample code is further extended to check for subnets. Algorithm 1. Get user’s ip_address. 2. IF ip_address does not have ‘/’ or … Continue reading

Posted in Python, Scripting | Tagged , , , | Leave a comment

[python]Validate an ip address

On python3 there is a build in ipaddress module which can be referenced to check if the user’s input is an ip address, no more using the complicated regex to match, this module helps to check and throws an exception … Continue reading

Posted in General stuffs, Python, Scripting | Tagged , , , | Leave a comment