docspec

Docspec is a JSON object specification for representing API documentation of programming languages.

21 个版本 Python >=3.8
安装
pip install docspec
poetry add docspec
pipenv install docspec
conda install docspec
描述

docspec

This Python packages provides

  • A library to (de-) serialize Docspec conformat JSON payloads
  • A CLI to validate and introspect such payloads

Example:

import docspec, sys
for module in docspec.load_modules(sys.stdin):
  module.members = [member for member in module.members if member.docstring]
  docspec.dump_module(sys.stdout)
$ docspec module.json --dump-tree
module docspec
| class Location
| | data filename
| | data lineno
| class Decoration
| | data name
# ...

The docspec Python module requires Python 3.5 or newer.


Copyright © 2020, Niklas Rosenstein

版本列表
2.2.2 2025-05-06
2.2.1 2023-05-28
2.2.0 2023-05-28
2.1.2 2023-03-15
2.0.2 2022-07-18
2.0.1 2022-03-24
2.0.0 2022-02-27
2.0.0a1 2022-02-23
1.3.0 2022-02-23
1.2.0 2021-09-23
1.1.0 2021-08-26
1.0.1 2021-07-22
1.0.0 2021-07-21
0.2.1 2021-02-21
0.2.0 2020-07-06
0.1.0 2020-06-11
0.0.5 2020-05-24
0.0.4 2020-05-24
0.0.3 2020-05-24
0.0.2 2020-05-19
0.0.1 2020-05-18