Elasticsearch : Curator does not work

I am trying out the basic code from curator

http://curator.readthedocs.io/en/4.0/examples.html

and i try

import elasticsearch
import curator
if __name__ == '__main__':
    client = elasticsearch.Elasticsearch([{'host': "http://localhost", 'port':9200}])

    ilo = curator.IndexList(client)
    ilo.filter_by_regex(kind='prefix', value='logstash-')
    print ilo

but i get

ilo = curator.IndexList(client)
AttributeError: 'module' object has no attribute 'IndexList'

what am i missing?

i had the incorrect version