ipserver.util package

IpServer’s Module Index

ipserver.util.args_util module

class ArgValidator(debug=False)

Bases: abc.ABC

arg_error(msg)
validate(args)
class ArgsHelper

Bases: object

static add_arguments(parser, arguments, overrides, raw=False, group_names=None)
static init_parser(arguments, formatter_class=<class 'argparse.ArgumentDefaultsHelpFormatter'>, raw=False, group_names=None)
static is_bool(v)
static setup_logging(verbose, log)
class StdinLoader

Bases: object

static load_env(name)
static read_stdin(timeout=2.0)
class StrAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)

Bases: argparse.Action

ipserver.util.data_io module

class DataInput(mode=None)

Bases: object

INPUT_BASE64 = 'BASE64'
INPUT_BINARY = 'BINARY'
INPUT_HEX = 'HEX'
INPUT_TEXT = 'TEXT'
decode_base64(base64_data)
decode_hex(hex_data)
get_data(input_data)
initialize(mode)
class DataOutput(mode=None)

Bases: object

OUTPUT_BASE64 = 'BASE64'
OUTPUT_BINARY = 'BINARY'
OUTPUT_HEX = 'HEX'
OUTPUT_NONE = 'NONE'
OUTPUT_TEXT = 'TEXT'
get_base64_data(data)
get_data(data)
get_hex_data(data)
initialize(mode)
class InteractiveInput

Bases: object

ACTION_COMMAND = 1
ACTION_INPUT = 2
get_input()
get_line()
get_stdin_read()
switch_command()
switch_input()
switch_text_mode()

ipserver.util.requester module

class Requester

Bases: object

get_connection(hostname, https=False)
request(method, parsed_url, headers, post_data)

ipserver.util.socket_client module

class SocketClient

Bases: object

PROTOCOL_SSL = 2
PROTOCOL_TCP = 1
PROTOCOL_UDP = 3
close()
create(hostname, port=0)
create_tcp_socket(hostname, port)
create_udp_socket()
initialize(protocol, timeout=8.0)
is_connected()
receive(bufsize=65565)
send(binary)
set_ssl_context(ssl_context)

ipserver.util.sys_util module

exception AppException

Bases: Exception

class Output

Bases: object

classmethod get_formatted_data(data, indent=2)
classmethod get_log_level()
classmethod info(msg)
classmethod is_logging(min_level=20)
classmethod line(msg)
classmethod warn(msg)
class System

Bases: object

classmethod exit(msg, error=False)
classmethod get_python_ver()
classmethod load_module(name)
classmethod verify_os(windows=False, macos=False, linux=False)

ipserver.util.urlparser module

class URLParser

Bases: object

test-sample.com:443 test-sample.com //test-sample.com/ http://test-sample.com/ http://test-sample.com/sample HTTP://test-sample.com/abc https://test-sample.com test-sample.com/sample

normalize_url(url)
parse(url, aux_port=True)
parse_url(url)