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.0.tar.gz (16.8 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.0-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: docstring_composer-0.1.0.tar.gz
  • Upload date:
  • Size: 16.8 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.0.tar.gz
Algorithm Hash digest
SHA256 f9f4dbe990a21a754eae820fd6e013b8be527f571f5bd5e8a80ba131cefcf9b9
MD5 786cf6c57099e9661136edd3b8319e98
BLAKE2b-256 e5ed8e4b7cec0e3cb16d031ea54b13a013a7fee4da4658d2c8391a8e7343fb6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for docstring_composer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1b6785876cf384cb0d6f430c2fa0b21f3ae8f9354f6358ebc69687a343e6405
MD5 a580c0d83e2f0e0c6e8977d4d634fbee
BLAKE2b-256 5cc599ff2947e577f65aa98c70030b98c4f95f22f452c968e62f236cf1e79858

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