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")

Generated by jmatt using JMatt's version of scpaste at Fri Feb 24 15:35:49 2012. MST. (original)