The following script prints the storage locations of all files in a Project. This includes the cloud storage locations for private cloud data, and Encord Files location for local data in the Project. Knowing where your files are storage helps to cross-verify that all data from a cloud bucket has been added to the Project.
To learn how to view the storage locations of all files in a Dataset, see our documentation here.
In the following script, ensure that you:
Replace <private_key_path> with the path to your private key.
Replace <project_hash\> with the hash of the Project you want to know the storage locations for.
Copy
# Import dependenciesfrom encord import EncordUserClient# Instantiate clientuser_client = EncordUserClient.create_with_ssh_private_key( ssh_private_key_path="<private_key_path>")# Specify Project. Replace <project_hash> with the hash of your Projectproject = user_client.get_project( project_hash="<project_hash>" )# Print Storage locationsfor log_line in project.list_label_rows_v2(): data_list = project.get_data(log_line.data_hash, get_signed_url=True) print(data_list)