File: users.md

package info (click to toggle)
python-griffe 1.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,292 kB
  • sloc: python: 17,202; makefile: 47; sh: 24; javascript: 13
file content (131 lines) | stat: -rw-r--r-- 4,022 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# 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.

<div class="grid cards" markdown>

- :material-cube-scan:{ .lg .middle } **Loading**

    ---

    Griffe can find packages and modules to scan them statically or dynamically and extract API-related information.

    [:octicons-arrow-right-24: Learn how to load data](users/loading.md)

- :material-navigation-variant-outline:{ .lg .middle } **Navigating**

    ---

    Griffe exposes the extracted API information into data models, making it easy to navigate your API.

    [:octicons-arrow-right-24: Learn how to navigate data](users/navigating.md)

- :material-code-json:{ .lg .middle } **Serializing**

    ---

    Griffe can serialize your API data into JSON, for other tools to navigate or manipulate it.

    [:octicons-arrow-right-24: Learn how to serialize data](users/serializing.md)

- :material-target:{ .lg .middle } **Checking**

    ---

    Griffe can compare snapshots of the same API to find breaking changes.

    [:octicons-arrow-right-24: Learn how to detect and handle breaking changes](users/checking.md)

- :material-puzzle-plus:{ .lg .middle } **Extending**

    ---

    API data can be augmented or modified thanks to Griffe's extension system.

    [:octicons-arrow-right-24: Learn how to write and use extensions](users/extending.md)

</div>

## Recommendations

These topics explore the user side: how to write code to better integrate with Griffe.

<div class="grid cards" markdown>

- :material-gift-open:{ .lg .middle } **Public API**

    ---

    See our recommendations for exposing public APIs to your users.

    [:octicons-arrow-right-24: See our public API recommendations](users/recommendations/public-apis.md)

- :material-star-face:{ .lg .middle } **Python code best practices**

    ---

    See our best practices for writing Python code.

    [:octicons-arrow-right-24: See our best practices](users/recommendations/python-code.md)

- :material-text:{ .lg .middle } **Docstrings**

    ---

    Griffe supports multiple docstring styles. Learn about these different styles, and see our recommendations to write docstrings.

    [:octicons-arrow-right-24: See our docstring recommendations](users/recommendations/docstrings.md)

</div>

## How-to

These how-tos will show you how to achieve specific things with Griffe.

<div class="grid cards" markdown>

-   :octicons-ai-model-24:{ .lg .middle } **Parse docstrings**

    ---

    Griffe can be used as a docstring-parsing library.

    [:octicons-arrow-right-24: See how to parse docstrings](users/how-to/parse-docstrings.md)

-   **@ Support custom decorators**

    ---

    Griffe will rarely support custom decorators through static analysis, but you can easily write extensions to do so.

    [:octicons-arrow-right-24: See how to support custom decorators](users/how-to/support-decorators.md)

-   :material-select:{ .lg .middle } **Selectively inspect objects**

    ---

    Sometimes static analysis is not enough, so you might want to use dynamic analysis (inspection) on certain objects.

    [:octicons-arrow-right-24: See how to selectively inspect objects](users/how-to/selectively-inspect.md)

-   :material-bow-tie:{ .lg .middle } **Set objects' docstring style**

    ---

    Sometimes the wrong docstring styles are attached to objects. You can fix this with a few different methods.

    [:octicons-arrow-right-24: See how to set the correct docstring styles on objects](users/how-to/set-docstring-styles.md)

-   :simple-git:{ .lg .middle } **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.

    [:octicons-arrow-right-24: See how to set the correct Git information or source link on objects](users/how-to/set-git-info.md)

</div>