[](https://github.com/medialab/docdocdoc/actions)
# Docdocdoc
A python library to template documentation from docstrings.
## Installation
You can install `docdocdoc` with pip with the following command:
```
pip install docdocdoc
```
## Usage
* [build](#build)
* [build_fn](#build_fn)
* [build_toc](#build_toc)
* [build_docs](#build_docs)
* [generate_readme](#generate_readme)
* [parts](#parts)
* [assembling_description](#assembling_description)
* [get_article](#get_article)
* [get_function](#get_function)
* [get_references](#get_references)
* [template_params](#template_params)
* [template_references](#template_references)
* [template_return](#template_return)
---
### build
#### build_fn
Function returning the function or class documentation written in Markdown.
*Arguments*
* **fn** *str* - str of the function or class name".
*Returns*
*str* - function or class documentation written in Markdown.
#### build_toc
Function returning the table of content written in Markdown.
*Arguments*
* **data** *list* - list of dicts with the keys "title" and "fns". "title" contains the name of the section and "fns" contains the name of the functions in the section.
*Returns*
*str* - table of content written in Markdown.
#### build_docs
Function returning the documentation written in Markdown.
*Arguments*
* **data** *list* - list of dicts with the keys "title" and "fns". "title" contains the name of the section and "fns" contains the name of the functions in the section.
*Returns*
*StringIO* - documentation written in Markdown.
#### generate_readme
Function printing readme.
*Arguments*
* **data** *list* - list of dicts with the keys "title" and "fns". "title" contains the name of the section and "fns" contains the name of the fonctions in the section.
---
### parts
#### assembling_description
Function returning the short description of the docstring,
aggregated with the long description.
*Arguments*
* **docstring** *DocstringStyle.GOOGLE* - a google docstring.
*Returns*
*string* - description of the docstring.
#### get_article
Function returning the article if the docstring has one, None otherwise.
*Arguments*
* **docstring** *DocstringStyle.GOOGLE* - a google docstring.
*Returns*
*string* - string containing the description of the article.
#### get_function
Function returning a dict with the different part for a function (or class)
documentation (i.e. name, description, article.).
*Arguments*
* **fn** *function* - a function you defined.
*Returns*
*dict* - dict with the different part of the documentation.
#### get_references
Function returning the references if the docstring has some, None otherwise.
*Arguments*
* **docstring** *DocstringStyle.GOOGLE* - a google docstring.
*Returns*
*list* - list containing the strings with the references.
#### template_params
Function returning templated arguments.
*Arguments*
* **fn_doc** *dict* - a dict with the function documentation parts (returned by get_function).
*Returns*
*string* - templated arguments.
#### template_references
Function returning templated references.
*Arguments*
* **fn_doc** *dict* - a dict with the function documentation parts (returned by get_function).
*Returns*
*string* - templated references.
#### template_return
Function returning templated arguments.
*Arguments*
* **fn_doc** *dict* - a dict with the function documentation parts (returned by get_function).
*Returns*
*string* - templated returns.
Raw data
{
"_id": null,
"home_page": "http://github.com/medialab/docdocdoc",
"name": "docdocdoc",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "documentation",
"author": "Guillaume Plique, Laura Miguel",
"author_email": "guillaume.plique@sciencespo.fr",
"download_url": "https://files.pythonhosted.org/packages/dd/2f/02840fef3d8f7cc236356c3a4abdf9f74d2923443b8514d20fb95f2c5b35/docdocdoc-0.1.0.tar.gz",
"platform": null,
"description": "[](https://github.com/medialab/docdocdoc/actions)\n\n# Docdocdoc\n\nA python library to template documentation from docstrings.\n\n## Installation\n\nYou can install `docdocdoc` with pip with the following command:\n\n```\npip install docdocdoc\n```\n\n## Usage\n\n* [build](#build)\n * [build_fn](#build_fn)\n * [build_toc](#build_toc)\n * [build_docs](#build_docs)\n * [generate_readme](#generate_readme)\n* [parts](#parts)\n * [assembling_description](#assembling_description)\n * [get_article](#get_article)\n * [get_function](#get_function)\n * [get_references](#get_references)\n * [template_params](#template_params)\n * [template_references](#template_references)\n * [template_return](#template_return)\n\n---\n\n### build\n\n#### build_fn\n\nFunction returning the function or class documentation written in Markdown.\n\n*Arguments*\n\n* **fn** *str* - str of the function or class name\".\n\n*Returns*\n\n*str* - function or class documentation written in Markdown.\n\n#### build_toc\n\nFunction returning the table of content written in Markdown.\n\n*Arguments*\n\n* **data** *list* - list of dicts with the keys \"title\" and \"fns\". \"title\" contains the name of the section and \"fns\" contains the name of the functions in the section.\n\n*Returns*\n\n*str* - table of content written in Markdown.\n\n#### build_docs\n\nFunction returning the documentation written in Markdown.\n\n*Arguments*\n\n* **data** *list* - list of dicts with the keys \"title\" and \"fns\". \"title\" contains the name of the section and \"fns\" contains the name of the functions in the section.\n\n*Returns*\n\n*StringIO* - documentation written in Markdown.\n\n#### generate_readme\n\nFunction printing readme.\n\n*Arguments*\n\n* **data** *list* - list of dicts with the keys \"title\" and \"fns\". \"title\" contains the name of the section and \"fns\" contains the name of the fonctions in the section.\n\n---\n\n### parts\n\n#### assembling_description\n\nFunction returning the short description of the docstring,\naggregated with the long description.\n\n*Arguments*\n\n* **docstring** *DocstringStyle.GOOGLE* - a google docstring.\n\n*Returns*\n\n*string* - description of the docstring.\n\n#### get_article\n\nFunction returning the article if the docstring has one, None otherwise.\n\n*Arguments*\n\n* **docstring** *DocstringStyle.GOOGLE* - a google docstring.\n\n*Returns*\n\n*string* - string containing the description of the article.\n\n#### get_function\n\nFunction returning a dict with the different part for a function (or class)\ndocumentation (i.e. name, description, article.).\n\n*Arguments*\n\n* **fn** *function* - a function you defined.\n\n*Returns*\n\n*dict* - dict with the different part of the documentation.\n\n#### get_references\n\nFunction returning the references if the docstring has some, None otherwise.\n\n*Arguments*\n\n* **docstring** *DocstringStyle.GOOGLE* - a google docstring.\n\n*Returns*\n\n*list* - list containing the strings with the references.\n\n#### template_params\n\nFunction returning templated arguments.\n\n*Arguments*\n\n* **fn_doc** *dict* - a dict with the function documentation parts (returned by get_function).\n\n*Returns*\n\n*string* - templated arguments.\n\n#### template_references\n\nFunction returning templated references.\n\n*Arguments*\n\n* **fn_doc** *dict* - a dict with the function documentation parts (returned by get_function).\n\n*Returns*\n\n*string* - templated references.\n\n#### template_return\n\nFunction returning templated arguments.\n\n*Arguments*\n\n* **fn_doc** *dict* - a dict with the function documentation parts (returned by get_function).\n\n*Returns*\n\n*string* - templated returns.\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A python library to template documentation from docstrings.",
"version": "0.1.0",
"split_keywords": [
"documentation"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "bab05276aecbc67c8161e642437acc1a",
"sha256": "005862cc659426f8847ff5b12e46b3a15724f5bb8081c24c4363bd9e49e8e02c"
},
"downloads": -1,
"filename": "docdocdoc-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bab05276aecbc67c8161e642437acc1a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 6149,
"upload_time": "2022-12-08T09:29:04",
"upload_time_iso_8601": "2022-12-08T09:29:04.738578Z",
"url": "https://files.pythonhosted.org/packages/3a/14/72485b98b3621e3344ace4ab2baed93f38ff8e2282ce220a1f9e7347ccbb/docdocdoc-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "d83cf56f5fc88bd73034f76bc6811058",
"sha256": "f68a9d1e11416d9eae49ee06d7bbf9b3dd577eded8cc5f8e472a90b19850d94d"
},
"downloads": -1,
"filename": "docdocdoc-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "d83cf56f5fc88bd73034f76bc6811058",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4117,
"upload_time": "2022-12-08T09:29:06",
"upload_time_iso_8601": "2022-12-08T09:29:06.508768Z",
"url": "https://files.pythonhosted.org/packages/dd/2f/02840fef3d8f7cc236356c3a4abdf9f74d2923443b8514d20fb95f2c5b35/docdocdoc-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-08 09:29:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "medialab",
"github_project": "docdocdoc",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "docdocdoc"
}