Installation¤
Griffe is a Python package, so you can install it with your favorite Python package installer or dependency manager.
Install as a tool & library¤
pip install griffe
pip is the main package installer for Python.
pdm add griffe
PDM is an all-in-one solution for Python project management.
poetry add griffe
Poetry is an all-in-one solution for Python project management.
rye add griffe
Rye is an all-in-one solution for Python project management, written in Rust.
uv add griffe
uv is an extremely fast Python package and project manager, written in Rust.
Install as a library only¤
If you only need the library for API introspection and analysis without the CLI tool, you can install griffelib:
pip install griffelib
pip is the main package installer for Python.
pdm add griffelib
PDM is an all-in-one solution for Python project management.
poetry add griffelib
Poetry is an all-in-one solution for Python project management.
rye add griffelib
Rye is an all-in-one solution for Python project management, written in Rust.
uv add griffelib
uv is an extremely fast Python package and project manager, written in Rust.
This installs the griffe package as usual, but without the CLI program and its dependencies.
Install as a tool only¤
pip install --user griffe
pip is the main package installer for Python.
pipx install griffe
pipx allows to install and run Python applications in isolated environments.
rye install griffe
Rye is an all-in-one solution for Python project management, written in Rust.
uv tool install griffe
uv is an extremely fast Python package and project manager, written in Rust.
Install the parser accelerator¤
Static analysis can use the optional prune-source Rust parser accelerator:
pip install "griffe[faster]"
# or pip install "griffelib[faster]"
uv add "griffe[faster]"
# or uv add "griffelib[faster]"
The separately distributed prune-source package uses Ruff to remove function bodies that Griffe does not visit before constructing the CPython AST. Griffe automatically uses the regular parser if the accelerator is not installed, the Python grammar is newer than its pinned Ruff version, the source is a .pyi stub, or an extension implements a visit-time hook that receives AST nodes.
Running Griffe¤
Once installed, you can run Griffe using the griffe command:
$ griffe check mypackage
Or as a Python module:
$ python -m griffe check mypackage