A lightweight Python library for parsing AST and extracting docstring information. Automatically generate documentation from Python source code by analyzing abstract syntax trees and docstrings.


Keywords
api-documentation, ast, code-analysis, code-documentation, docstring, documentation, documentation-generator, google-style, mkdocs, numpy-style, parser, python, sphinx, static-analysis
License
Other
Install
pip install astdoc==1.2.1

Documentation

astdoc

PyPI Version Build Status Coverage Status Documentation Status Python Version

A lightweight Python library for parsing and analyzing abstract syntax trees (AST) and extracting docstring information. Designed to facilitate the documentation process, astdoc provides tools for developers to easily access, manipulate, and generate documentation from Python code.

Features

  • Smart Docstring Parsing: Automatically extracts and parses docstrings in Google and NumPy styles
  • AST Analysis: Deep understanding of Python code structure through AST traversal
  • Namespace Support: Handles namespace packages and complex module structures
  • Type-Aware: Built-in support for type hints and annotations
  • Modern Python: Compatible with Python 3.10+ including the latest 3.13
  • Lightweight: Minimal dependencies, focusing on core functionality

Installation

pip install astdoc

Documentation

For detailed documentation, visit https://daizutabi.github.io/astdoc/

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.