We are excited to announce the initial release of CodeStructure, a Python package that helps you analyze the structure of a Python file and extracts information about its classes, functions, and their associated attributes. This tool is particularly useful for understanding and documenting complex codebases and writing design docs.
New Features
- Extract class and function signatures
- Extract class attributes
- Extract function parameters and their types
- Extract function return types
- Extract decorators and docstrings
- Display the extracted information in a human-readable format
Installation
You can install CodeStructure via pip:
bash
pip install codestructure
Usage
To use CodeStructure, simply run the script with the path to the Python file you want to analyze:
bash
codestructure path/to/your/python_file.py
For more information on how to use CodeStructure, please refer to the [README](https://github.com/basnijholt/codestructure/blob/main/README.md).
We look forward to hearing your feedback and welcome contributions to improve CodeStructure! Please report any issues or feature requests on the [GitHub repository](https://github.com/basnijholt/codestructure/issues).