It seems that Pyright (the Python type checker made by Microsoft) can only be used as a command line tool or from VS Code. But is it possible to call pyright from code (as an API)? For example, mypy supports usage like: import sys from mypy import api result = api.run("your code") Continue reading...