Skip to main content

A package to convert schema-based docstrings to different language formats

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docstring_composer-0.1.3.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docstring_composer-0.1.3-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file docstring_composer-0.1.3.tar.gz.

File metadata

  • Download URL: docstring_composer-0.1.3.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for docstring_composer-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6ec4d47f86b09a7aae5b51959b5b4dcdb2d2044614ccb2c28b9fd78d92cb81c0
MD5 5af5006981c36842aae4789f0e2c40c6
BLAKE2b-256 14308b8b85217ffb88d7edd2657c3f975eb80c8020240fcb9d9d0c46010083f2

See more details on using hashes here.

File details

Details for the file docstring_composer-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for docstring_composer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fb20752f2d4db0b787d5ad03023770cfbe706087615ca12c761341ac500962a2
MD5 903cb26c2269e18c85a4c735d5eb1392
BLAKE2b-256 5a165d838d548c08ffb2d2a293c5f10657e32921dd7852d9c6c5389a6daa6eb3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page