# docstring-to-markdown
[![tests](https://github.com/python-lsp/docstring-to-markdown/workflows/tests/badge.svg)](https://github.com/python-lsp/docstring-to-markdown/actions?query=workflow%3A%22tests%22)
![CodeQL](https://github.com/python-lsp/docstring-to-markdown/workflows/CodeQL/badge.svg)
[![pypi-version](https://img.shields.io/pypi/v/docstring-to-markdown.svg)](https://python.org/pypi/docstring-to-markdown)
On the fly conversion of Python docstrings to markdown
- Python 3.6+ (tested on 3.7 up to 3.11)
- can recognise reStructuredText and convert multiple of its features to Markdown
- since v0.13 includes initial support for Google-formatted docstrings
### Installation
```bash
pip install docstring-to-markdown
```
### Example
Convert reStructuredText:
```python
>>> import docstring_to_markdown
>>> docstring_to_markdown.convert(':math:`\\sum`')
'$\\sum$'
```
When given the format cannot be recognised an exception will be raised:
```python
>>> docstring_to_markdown.convert('\\sum')
Traceback (most recent call last):
raise UnknownFormatError()
docstring_to_markdown.UnknownFormatError
```
### Development
```bash
pip install -e .
pytest
```
Raw data
{
"_id": null,
"home_page": "",
"name": "docstring-to-markdown",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "Docstring,conversion,markdown",
"author": "Micha\u0142 Krassowski",
"author_email": "krassowski.michal+pypi@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/7a/ad/6a66abd14676619bd56f6b924c96321a2e2d7d86558841d94a30023eec53/docstring-to-markdown-0.15.tar.gz",
"platform": null,
"description": "# docstring-to-markdown\n\n[![tests](https://github.com/python-lsp/docstring-to-markdown/workflows/tests/badge.svg)](https://github.com/python-lsp/docstring-to-markdown/actions?query=workflow%3A%22tests%22)\n![CodeQL](https://github.com/python-lsp/docstring-to-markdown/workflows/CodeQL/badge.svg)\n[![pypi-version](https://img.shields.io/pypi/v/docstring-to-markdown.svg)](https://python.org/pypi/docstring-to-markdown)\n\nOn the fly conversion of Python docstrings to markdown\n\n- Python 3.6+ (tested on 3.7 up to 3.11)\n- can recognise reStructuredText and convert multiple of its features to Markdown\n- since v0.13 includes initial support for Google-formatted docstrings\n\n### Installation\n\n```bash\npip install docstring-to-markdown\n```\n\n### Example\n\nConvert reStructuredText:\n\n```python\n>>> import docstring_to_markdown\n>>> docstring_to_markdown.convert(':math:`\\\\sum`')\n'$\\\\sum$'\n```\n\nWhen given the format cannot be recognised an exception will be raised:\n\n```python\n>>> docstring_to_markdown.convert('\\\\sum')\nTraceback (most recent call last):\n raise UnknownFormatError()\ndocstring_to_markdown.UnknownFormatError\n```\n\n### Development\n\n```bash\npip install -e .\npytest\n```\n\n\n",
"bugtrack_url": null,
"license": "LGPL-2.1-or-later",
"summary": "On the fly conversion of Python docstrings to markdown",
"version": "0.15",
"project_urls": {
"Bug Tracker": "https://github.com/python-lsp/docstring-to-markdown/issues",
"Source Code": "https://github.com/python-lsp/docstring-to-markdown"
},
"split_keywords": [
"docstring",
"conversion",
"markdown"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c1cf4eee59f6c4111b3e80cc32cf6bac483a90646f5c8693e84496c9855e8e38",
"md5": "0e4c4f2f60fba46c0b1b136e9262d89e",
"sha256": "27afb3faedba81e34c33521c32bbd258d7fbb79eedf7d29bc4e81080e854aec0"
},
"downloads": -1,
"filename": "docstring_to_markdown-0.15-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0e4c4f2f60fba46c0b1b136e9262d89e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 21640,
"upload_time": "2024-02-21T13:51:08",
"upload_time_iso_8601": "2024-02-21T13:51:08.214062Z",
"url": "https://files.pythonhosted.org/packages/c1/cf/4eee59f6c4111b3e80cc32cf6bac483a90646f5c8693e84496c9855e8e38/docstring_to_markdown-0.15-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7aad6a66abd14676619bd56f6b924c96321a2e2d7d86558841d94a30023eec53",
"md5": "fe2d4afd2e75807fc8b72957aaef8a29",
"sha256": "e146114d9c50c181b1d25505054a8d0f7a476837f0da2c19f07e06eaed52b73d"
},
"downloads": -1,
"filename": "docstring-to-markdown-0.15.tar.gz",
"has_sig": false,
"md5_digest": "fe2d4afd2e75807fc8b72957aaef8a29",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 29246,
"upload_time": "2024-02-21T13:51:09",
"upload_time_iso_8601": "2024-02-21T13:51:09.551868Z",
"url": "https://files.pythonhosted.org/packages/7a/ad/6a66abd14676619bd56f6b924c96321a2e2d7d86558841d94a30023eec53/docstring-to-markdown-0.15.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-21 13:51:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "python-lsp",
"github_project": "docstring-to-markdown",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "docstring-to-markdown"
}