Summary
Would the project be interested in exposing a Python API for Pyrefly, similar to mypy.api?
Currently, the Python package is a CLI wrapper invoking pyrefly via subprocess. I'm building a python transpiler and wanted to use pyrefly in CI to verify the generated python code is valid. I had performance concerns calling subprocess as much as I wanted to; wondering if direct bindings exposed to the python api would be better? My guess is yes...
I pictured something like this but it's actually just an FFI to the rust code:
import pyrefly
result = pyrefly.check(paths=["src"])
Before spending time on a prototype, I wanted to check whether maintainers would be open to this direction or had other suggestions. I'd love the chance to work on something like this :)
Summary
Would the project be interested in exposing a Python API for Pyrefly, similar to
mypy.api?Currently, the Python package is a CLI wrapper invoking pyrefly via
subprocess. I'm building a python transpiler and wanted to use pyrefly in CI to verify the generated python code is valid. I had performance concerns calling subprocess as much as I wanted to; wondering if direct bindings exposed to the python api would be better? My guess is yes...I pictured something like this but it's actually just an FFI to the rust code:
Before spending time on a prototype, I wanted to check whether maintainers would be open to this direction or had other suggestions. I'd love the chance to work on something like this :)