I needed to do this kind of thing all the time, and decided it would be neat to make a hdf5 version of pickle: https://github.com/telegraphic/hickle
The motivation was storing python dictionaries of numpy arrays, which sounds like what you're after:
import hickle as hkl
import numpy as np
data = {
'dataset1' : np.zeros((100,100)),
'dataset2' : np.random.random((100,100))
}
hkl.dump(data, 'output_filename.hkl')
You should be able to install it via PyPi (pip install hickle), or download it from github.
Cheers Danny