User guide¤
Welcome to the Griffe user guide!
Manipulating APIs¤
The following topics will guide you through the various methods Griffe offers for exploring and exploiting Python APIs.
-
Loading
Griffe can find packages and modules to scan them statically or dynamically and extract API-related information.
-
Navigating
Griffe exposes the extracted API information into data models, making it easy to navigate your API.
-
Serializing
Griffe can serialize your API data into JSON, for other tools to navigate or manipulate it.
-
Checking
Griffe can compare snapshots of the same API to find breaking changes.
-
Extending
API data can be augmented or modified thanks to Griffe's extension system.
Recommendations¤
These topics explore the user side: how to write code to better integrate with Griffe.
-
Public API
See our recommendations for exposing public APIs to your users.
-
Python code best practices
See our best practices for writing Python code.
-
Docstrings
Griffe supports multiple docstring styles. Learn about these different styles, and see our recommendations to write docstrings.
How-to¤
These how-tos will show you how to achieve specific things with Griffe.
-
Parse docstrings
Griffe can be used as a docstring-parsing library.
-
@ Support custom decorators
Griffe will rarely support custom decorators through static analysis, but you can easily write extensions to do so.
-
Selectively inspect objects
Sometimes static analysis is not enough, so you might want to use dynamic analysis (inspection) on certain objects.
-
Set objects' docstring style
Sometimes the wrong docstring styles are attached to objects. You can fix this with a few different methods.
-
Set Git source info on objects
Griffe tries to find the right Git remote URL to provide source links to loaded objects. In some cases you might want to override the Git information or the source link directly.
See how to set the correct Git information or source link on objects