File: gen_griffe_json.py

package info (click to toggle)
python-griffe 1.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,256 kB
  • sloc: python: 16,348; javascript: 84; makefile: 47; sh: 24
file content (9 lines) | stat: -rw-r--r-- 331 bytes parent folder | download
1
2
3
4
5
6
7
8
9
"""Generate the JSON API data file."""

import mkdocs_gen_files

python_handler = mkdocs_gen_files.config.plugins["mkdocstrings"].get_handler("python")
data = python_handler.collect("griffe", options=python_handler.get_options({}))

with mkdocs_gen_files.open("griffe.json", "w") as fd:
    print(data.as_json(full=True), file=fd)