Would https://github.com/Zac-HD/hypothesmith fit in here?
This package provides two Hypothesis strategies for generating Python source code.
The generated code will always be syntactically valid, and is useful for testing parsers, linters, auto-formatters, and other tools that operate on source code.