from src.ossConfig import ossConfig import unicloud_oss.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' objects = Oss.list_objects(config, bucket_name) if objects is not None: # List the object names for obj in objects: print(obj["Key"]) else: print("ERROR!") |