def validate_args ( * * args ) : if not args [ 'query' ] : print ( "\nMissing required query argument." ) sys . exit ( ) for key in DEFAULTS : if key not in args : args [ key ] = DEFAULTS [ key ] return args
if value key in python not provided, defaulted to none python
function to check if input query is not None and set missing arguments to default value
def validate_args(**args):
	"""
	function to check if input query is not None 
	and set missing arguments to default value
	"""
	if not args['query']:
		print("\nMissing required query argument.")
		sys.exit()

	for key in DEFAULTS:
		if key not in args:
			args[key] = DEFAULTS[key]

	return args