How to read HDF5 attributes (metadata) with Python and h5py

I have a HDF5 file with multiple folders inside. Each folder has attributes added (some call attributes “metadata”). I know how to access the keys inside a folder, but I don’t know how to pull the attributes with Python’s h5py package. Here are attributes from HDFView:

   Group size = 9
   Number of attributes = 1
        measRelTime_seconds = 201.73

I need to pull this measRelTime_seconds value. I already have a loop to read files

f = h5py.File(file,'r')
        for k,key in enumerate(f.keys()): #loop over folders
            #need to obtain measRelTime_seconds here, I guess



Ok, I find my answer. To read it You can simply check the name of the attribute as


and the value can be returned with

f['Folder'].attrs['<name of the attribute>']