Install the Python SDK
Prerequisites
Python 3.13 or newer. A virtual environment is recommended.
Install
pip install panproto
The wheel includes native PyO3 bindings and the core tree-sitter grammar group. Additional grammar packs are installed separately:
pip install panproto-grammars-functional # Haskell, OCaml, Elm, Erlang, Elixir, ...
pip install panproto-grammars-web # HTML, CSS, Vue, Svelte, ...
pip install panproto-grammars-all # umbrella package
The full table of packs is in Reference: Python SDK.
Verification
import panproto
print(panproto.list_builtin_protocols()[:3])
The native module loads at import time (no async wrapper, unlike the TypeScript SDK). Listing a few of the built-in protocols confirms the linkage. The full top-level surface is in Reference: Python SDK.
Common mistakes
- Running under Python earlier than 3.13. The package metadata requires Python 3.13 or later.
- Importing each grammar pack manually.
AstParserRegistrydiscovers installed packs through theirpanproto.grammarsentry points.