from src.ossConfig import ossConfig
import Oss as Oss access_key = 'youraccesskey' secret_key = 'yoursecretkey' endpoint_url = 'http://XXXXXXXXXXXXXXXXX.com' config = ossConfig(access_key,secret_key,endpoint_url) bucket_name = 'test1' object_name = "testfile" if Oss.restore_object(config,bucket_name,object_name): print("restore success") else: print("failed") |