I have a three folders in GCS and I want to create a dictionary that has the folder name as the key and its contents as the values with without the file_type as the values. How do I do this?
Example:
In the following folder I have these files
temp_folder/stats/data_transfer/
extraction.csv
united_sync.csv
united_configs.csv
united_history.csv
In another folder
temp_folder/stats/appointments/
I have the following
appointment_history.csv
appointment_configs.csv
appointment_transactions.csv
Expected Outcome:
folders_dict = {
'data_transfer': ['extraction', 'united_sync', 'united_configs', 'united_history'],
'appointment': ['appointment_history', 'appointment_configs', 'appointment_transactions']
}