How to use the keyvi.__version__ function in keyvi

To help you get started, we’ve selected a few keyvi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github KeyviDev / keyvi / python / src / py / keyvi / cli / cli.py View on Github external
def main():
    argument_parser = ArgumentParser(description='keyvi')

    argument_parser.add_argument('-v', '--version', action='version', version=keyvi.__version__)

    subparsers = argument_parser.add_subparsers(dest='command')

    stats_parser = subparsers.add_parser('stats')
    stats_parser.add_argument('input_file', type=str, metavar='FILE')

    dump_parser = subparsers.add_parser('dump')
    dump_parser.add_argument('input_file', type=str, metavar='FILE')
    dump_parser.add_argument('output_file', type=str, metavar='OUT_FILE')
    dump_parser.add_argument('-j', '--json-dumps', action='store_true',
                             help='wrap values with json.dumps()')

    compile_parser = subparsers.add_parser('compile')
    compile_parser.add_argument('input_file', type=str, metavar='FILE')
    compile_parser.add_argument('output_file', type=str, metavar='OUT_FILE')
    compile_parser.add_argument('dict_type', type=str, choices=['json', 'string', 'int', 'completion', 'key-only'],