def create_subscription(topic_name, subscription_name):
 pubsub_client = pubsub.Client()
 topic = pubsub_client.topic(topic_name)
 subscription = topic.subscription(subscription_name)
 subscription.create()
 print 'Subscription {} created on topic {}.'.format(subscription.name, topic.name)

def create_subscription ( topic_name , subscription_name ) : pubsub_client = pubsub . Client ( ) topic = pubsub_client . topic ( topic_name ) subscription = topic . subscription ( subscription_name ) subscription . create ( ) print 'Subscription {} created on topic {}.' . format ( subscription . name , topic . name )
create a new pull subscription on the given topic .