import sys import pprint from urlparse import urlparse from thrift.transport import TTransport from thrift.transport import TSocket from thrift.transport import THttpClient from thrift.protocol import TBinaryProtocol import Snowflake from ttypes import * host = 'localhost' port = 7610 socket = TSocket.TSocket(host, port) transport = TTransport.TFramedTransport(socket) protocol = TBinaryProtocol.TBinaryProtocol(transport) client = Snowflake.Client(protocol) transport.open() client.get_timestamp() client.get_id("test")