import cdsapi

c = cdsapi.Client()

c.retrieve(
    'reanalysis-era5-pressure-levels',
    {
        'product_type':'reanalysis',
        'format':'grib',
        'variable':'relative_humidity',
        'pressure_level':[
            '875','900','925',
            '950','975','1000'
        ],
        'year':'2018',
        'month':[
            '01','02','03',
            '04','05','06',
            '07','08','09',
            '10','11','12'
        ],
        'day':[
            '01','02','03',
            '04','05','06',
            '07','08','09',
            '10','11','12',
            '13','14','15',
            '16','17','18',
            '19','20','21',
            '22','23','24',
            '25','26','27',
            '28','29','30',
            '31'
        ],
        'area':[20.1500159034, 34.9199876979, 26.6041955909, 41.8269046087],
        'time':[
            '00:00','03:00','10:00',
            '14:00','17:00','21:00'
        ]
    },
    'hum.grib')