Overview of the Type Server Protocol (TSP)
mainThe Type Server Protocol (TSP) is a JSON-RPC based protocol used to request Python analysis data from a type server. It provides access to protocol versions, snapshots, Python search paths, import resolution, and various type queries (computed, declared, and expected types).
Key characteristics:
- Data Shapes: Uses Language Server Protocol (LSP) conventions for
Position,Range, and URI string representations. - Method Prefix: All TSP methods are prefixed with
typeServer/. - Communication: Typically operates over
stdioon a main JSON-RPC connection, with optional support for extra read-only connections viaipc.