Mypy daemon (mypy server)

Instead of running mypy as a command-line tool, you can also run it asa long-running daemon (server) process and use a command-line client tosend type-checking requests to the server. This way mypy can perform typechecking much faster, since program state cached from previous runs is keptin memory and doesn’t have to be read from the file system on each run.The server also uses finer-grained dependency tracking to reduce the amountof work that needs to be done.

If you have a large codebase to check, running mypy using the mypydaemon can be 10 or more times faster than the regular command-linemypy tool, especially if your workflow involves running mypyrepeatedly after small edits – which is often a good idea, as this wayyou’ll find errors sooner.

Note

The command-line of interface of mypy daemon may change in future mypyreleases.

Note

Each mypy daemon process supports one user and one set of source files,and it can only process one type checking request at a time. You canrun multiple mypy daemon processes to type check multiple repositories.