import mapbox_vector_tile import json import sys with open(sys.argv[1], 'rb') as f: data = f.read() decoded_data = mapbox_vector_tile.decode(data) print(json.dumps(decoded_data)) with open('out.txt', 'w') as f: f.write(repr(decoded_data))