How to create daily rotation index with python-elasticsearch

Just like logstash index, which could be rotated daily automatically.
How to achieve this with python-elasticsearch?
create daily rotation index and search from the index.

no need to add any logic in your python code, just use index name datemath