File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Try Griffe in your browser
2+
3+ Try Griffe directly in your browser thanks to Pyodide!
4+ You can click the "Run" button in the top-right corner of each editor,
5+ or hit ++ctrl+enter++ to run the code.
6+
7+
8+ In the following example, we import ` griffe ` and use it to load itself.
9+ Then we output the signature of the ` Function ` class as JSON.
10+
11+ ``` pyodide install="griffe"
12+ import griffe
13+ griffe_pkg = griffe.load("griffe")
14+ griffe_pkg["dataclasses.Function"].as_json(indent=2)
15+ ```
16+
17+ Try it out with another package of your choice!
18+ Just replace ` your-dist-name ` with a package's distribution name,
19+ and ` your_package_name ` with the package's import name:
20+
21+ ``` pyodide
22+ import micropip
23+ await micropip.install("your-dist-name")
24+ data = griffe.load("your_package_name")
25+ data.as_json(indent=2)[:1000] # truncate to a thousand characters...
26+ ```
Original file line number Diff line number Diff line change 2323 - Docstrings :
2424 - Supported styles : docstrings.md
2525 - Parsing docstrings in Python : parsing_docstrings.md
26+ - Try it out! :
27+ - Run Griffe in your browser : try_it_out.md
2628# defer to gen-files + literate-nav
2729- API reference :
2830 - Griffe : reference/
@@ -85,6 +87,7 @@ markdown_extensions:
8587- pymdownx.emoji :
8688 emoji_index : !!python/name:materialx.emoji.twemoji
8789 emoji_generator : !!python/name:materialx.emoji.to_svg
90+ - pymdownx.keys
8891- pymdownx.magiclink
8992- pymdownx.snippets :
9093 check_paths : true
You can’t perform that action at this time.
0 commit comments