Skip to content

@krotkiewicz /suds.py secret
Last active

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
api = get_carrier('fedex', self.config)
#load Client and wsdl file:
# >>> api.client
# *** AttributeError: 'Fedex' object has no attribute 'client'
response = api.get_rates('78701', '78701', 2, 'GROUND')
# >>> api.client
# <suds.client.Client object at 0x10b6783d0>
# api.client is cloned each time when api.get_rates is called so it is thread safe
# and wsdl file is loaded only once.
if type_ == 'sync':
start = time.time()
for x in range(HOW_MANY):
response = api.get_rates('78701', '78701', 2, 'GROUND')
end = time.time()
elif type_ == 'single':
start = time.time()
response = api.get_rates('78701', '78701', 2, 'GROUND')
end = time.time()
else:
threads = []
start = time.time()
for x in range(HOW_MANY):
t = Thread(api)
t.start()
threads.append(t)
for t in threads:
t.join()
end = time.time()
a_time = end - start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.