ippy package

Submodules

ippy.ippy module

Python script to check if IP address and domains are accessible or not. .. codeauthor:: Shivam Mathur <shivam_jpr@hotmail.com>

class ippy.ippy.Ippy(verbose_mode=True, output_mode='json', num_workers=4, file=None)[source]

Bases: object

get_accessible
get_filepath()[source]
Return file_path:
 Returns absolute path of the Input file.
get_not_accessible
static get_ping_args(platform_os=None)[source]
Return ping_args:
 ping command with arguments
get_results
result()[source]

Function to encode the output into the specified output mode. :return result: The output string in the specified output mode.

run()[source]

Function to put everything together and parse the ping outputs.

set_config(verbose_mode=True, output_mode='json', num_workers=4)[source]

Function to set the configuration of IPpy :param verbose_mode: Print ping output if True. :param output_mode: Output mode of the results. Supported - ‘json’ or ‘csv’. :param num_workers: Number of workers to ping.

set_file(file=None)[source]

Function to set the input file. :param file: Input filename.

static worker_func(ping_args, pending, done)[source]

Function to perform the actual ping. :param ping_args: Ping arguments :param pending: Pending queue :param done: Done queue

Module contents