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.2.tar.gz
(17.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docstring_composer-0.1.2.tar.gz.
File metadata
- Download URL: docstring_composer-0.1.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81a0bcc387124f88aeffb36cca211a68f9c6623670719c834ec3e47a35dc90cc
|
|
| MD5 |
7eca0f7320e2a3c5a6d3650413bc78f3
|
|
| BLAKE2b-256 |
7969b333e02920221c0f619f640b569547defefc497eca9593bf83c09fbe97ff
|
File details
Details for the file docstring_composer-0.1.2-py3-none-any.whl.
File metadata
- Download URL: docstring_composer-0.1.2-py3-none-any.whl
- Upload date:
- Size: 31.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3fafd24b9317e1e7f22a427cc6a2f9ce5046b60c6174b69e1cad1f63417f323
|
|
| MD5 |
63705ae75f650d2e01200eb6f4709bf8
|
|
| BLAKE2b-256 |
3dab0ec45ced30d450c134b8f25c3c1720c18e6943385c5533f2f1fc605ae750
|