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.1.tar.gz (16.9 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.1-py3-none-any.whl (31.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: docstring_composer-0.1.1.tar.gz
  • Upload date:
  • Size: 16.9 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.1.tar.gz
Algorithm Hash digest
SHA256 a4958227f2559650c32408d42489f8b9cbb2931f5a930a901a12a9a53184d96e
MD5 e4327ce7533e5f36deb30528e3ad165f
BLAKE2b-256 12ad3392c4a60f158501201e84e5ee0b1714fbca6f24580f338bafedd89fde96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for docstring_composer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3488be0a33c75deef0d2152dba147b5ec4e5d1f1c29d240e7ffb3e9d0067590a
MD5 31af51f44bf43e23be0076ec2f89312b
BLAKE2b-256 ec276575610dddff3fb339e38b004054ae74e5d159564c7b63989bd67db421f4

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