# Import the eShipz client.
import eshipz
# Setup the client with your API key.
eshipz.api_key = '259DA788-39A3-439E-BA1E-BC541B8BA520'
# Purchase a shipment to receive a postage label.
shipment = eshipz.Shipment.retrieve(
'shp_339f74ca0aa840d399bbb728a3ac3863'
)
shipment.buy(rate=shipment.lowest_rate())