def create_astropy_constant(py_obj, h_group, call_id=0, **kwargs):
    """ dumps an astropy constant

    Args:
        py_obj: python object to dump; should be a python type (int, float, bool etc)
        h_group (h5.File.group): group to dump data into.
        call_id (int): index to identify object's relative location in the iterable.
    """
    d = h_group.create_dataset('data_%i' % call_id, data=py_obj.value,
        dtype='float64')
    d.attrs['type'] = [b'astropy_constant']
    d.attrs['unit'] = [str(py_obj.unit)]
    d.attrs['abbrev'] = [str(py_obj.abbrev)]
    d.attrs['name'] = [str(py_obj.name)]
    d.attrs['reference'] = [str(py_obj.reference)]
    d.attrs['uncertainty'] = [py_obj.uncertainty]
    if py_obj.system:
        d.attrs['system'] = [py_obj.system]
