Skip to main content

Docstring Composer

A Python package that converts schema-based docstrings to different language formats, including:

  • Google-style docstrings for Python
  • Javadoc for Java
  • JSDoc for JavaScript/TypeScript
  • And more...

Installation

pip install docstring-composer

Usage

Command Line

# Convert a docstring schema file to a specific language format
docstring-composer convert --schema input.json --language python --style google --output output.py

# or pipe from stdin
cat input.json | docstring-composer convert --language java

Python API

from docstring_composer import DocstringComposer

# Create a composer instance
composer = DocstringComposer()

# Convert a docstring schema to a specific language format
docstring_schema = {...}  # Your docstring schema as a dictionary
result = composer.convert(
    schema=docstring_schema, 
    language="python", 
    style="google"
)
print(result)

Supported Languages and Styles

  • Python: "google", "numpy", "sphinx", "epydoc", "rest"
  • Java: "javadoc"
  • JavaScript/TypeScript: "jsdoc", "typedoc"
  • C#: "xmldoc"
  • Ruby: "yard"
  • Kotlin: "kdoc"
  • C: "doxygen"
  • C++: "doxygen"
  • PHP: "phpdoc"
  • Go: "godoc"

License

MIT License

Release files for docstring-composer 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docstring-composer 0.1.3
File Size Uploaded
docstring_composer-0.1.3.tar.gz 17.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docstring-composer 0.1.3
File Interpreter ABI Platform
docstring_composer-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 48.1 kB

Release files / docstring_composer-0.1.3.tar.gz

Download URL docstring_composer-0.1.3.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6ec4d47f86b09a7aae5b51959b5b4dcdb2d2044614ccb2c28b9fd78d92cb81c0
BLAKE2b-256 checksum
How to use checksums
14308b8b85217ffb88d7edd2657c3f975eb80c8020240fcb9d9d0c46010083f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / docstring_composer-0.1.3-py3-none-any.whl

Download URL docstring_composer-0.1.3-py3-none-any.whl
Size 31.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb20752f2d4db0b787d5ad03023770cfbe706087615ca12c761341ac500962a2
BLAKE2b-256 checksum
How to use checksums
5a165d838d548c08ffb2d2a293c5f10657e32921dd7852d9c6c5389a6daa6eb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page