I've tried to move large ansible playbooks to pyinfra and there is no any benefit in the end. pyinfra is also "state"-oriented and for complex cases with logic you have to perform some acrobatics. IMHO switch resulted in the same mess as ansible playbooks.
Note: I am python-fanatic with 15y experience.