def main():
    """The main script"""
    from docopt import docopt
    args = docopt(__doc__, version=kp.version)

    kp.logger.set_level("km3pipe", args['-d'])

    pipe = kp.Pipeline()
    pipe.attach(
        kp.io.ch.CHPump,
        host=args['SOURCE_IP'],
        port=int(args['-p']),
        tags=args['-m'],
        timeout=int(args['-x']),
        max_queue=int(args['-s'])
    )
    pipe.attach(LigierSender, target_ip=args['-t'], port=int(args['-q']))
    pipe.drain()
The main script