docstring_parser
================
[![Build](https://github.com/rr-/docstring_parser/actions/workflows/build.yml/badge.svg)](https://github.com/rr-/docstring_parser/actions/workflows/build.yml)
Parse Python docstrings. Currently support ReST, Google, Numpydoc-style and
Epydoc docstrings.
Example usage:
```python
>>> from docstring_parser import parse
>>>
>>>
>>> docstring = parse(
... '''
... Short description
...
... Long description spanning multiple lines
... - First line
... - Second line
... - Third line
...
... :param name: description 1
... :param int priority: description 2
... :param str sender: description 3
... :raises ValueError: if name is invalid
... ''')
>>>
>>> docstring.long_description
'Long description spanning multiple lines\n- First line\n- Second line\n- Third line'
>>> docstring.params[1].arg_name
'priority'
>>> docstring.raises[0].type_name
'ValueError'
```
Read [API Documentation](https://rr-.github.io/docstring_parser/).
# Contributing
To set up the project:
```sh
pip install --user poetry
git clone https://github.com/rr-/docstring_parser.git
cd docstring_parser
poetry install
poetry run pre-commit install
```
To run tests:
```
poetry run pytest
```
Raw data
{
"_id": null,
"home_page": "https://github.com/rr-/docstring_parser",
"name": "docstring-parser",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Marcin Kurczewski",
"author_email": "dash@wind.garden",
"download_url": "https://files.pythonhosted.org/packages/e8/2d/ea1dfc15b909cc660f657a3a9d698a2916b7f3b05535a2d72e8d7ea3ad5b/docstring_parser-0.15.tar.gz",
"platform": null,
"description": "docstring_parser\n================\n\n[![Build](https://github.com/rr-/docstring_parser/actions/workflows/build.yml/badge.svg)](https://github.com/rr-/docstring_parser/actions/workflows/build.yml)\n\nParse Python docstrings. Currently support ReST, Google, Numpydoc-style and\nEpydoc docstrings.\n\nExample usage:\n\n```python\n>>> from docstring_parser import parse\n>>>\n>>>\n>>> docstring = parse(\n... '''\n... Short description\n...\n... Long description spanning multiple lines\n... - First line\n... - Second line\n... - Third line\n...\n... :param name: description 1\n... :param int priority: description 2\n... :param str sender: description 3\n... :raises ValueError: if name is invalid\n... ''')\n>>>\n>>> docstring.long_description\n'Long description spanning multiple lines\\n- First line\\n- Second line\\n- Third line'\n>>> docstring.params[1].arg_name\n'priority'\n>>> docstring.raises[0].type_name\n'ValueError'\n```\n\nRead [API Documentation](https://rr-.github.io/docstring_parser/).\n\n# Contributing\n\nTo set up the project:\n```sh\npip install --user poetry\n\ngit clone https://github.com/rr-/docstring_parser.git\ncd docstring_parser\n\npoetry install\npoetry run pre-commit install\n```\n\nTo run tests:\n```\npoetry run pytest\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Parse Python docstrings in reST, Google and Numpydoc format",
"version": "0.15",
"project_urls": {
"Homepage": "https://github.com/rr-/docstring_parser",
"Repository": "https://github.com/rr-/docstring_parser"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "89e332e272db7adcf90e93f73e9a98fd763049ed7c641fb57ab26cb8f3e7e79c",
"md5": "4176b7d4890596aba13f4a330dca5d68",
"sha256": "d1679b86250d269d06a99670924d6bce45adc00b08069dae8c47d98e89b667a9"
},
"downloads": -1,
"filename": "docstring_parser-0.15-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4176b7d4890596aba13f4a330dca5d68",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6,<4.0",
"size": 36093,
"upload_time": "2022-09-05T07:36:05",
"upload_time_iso_8601": "2022-09-05T07:36:05.303261Z",
"url": "https://files.pythonhosted.org/packages/89/e3/32e272db7adcf90e93f73e9a98fd763049ed7c641fb57ab26cb8f3e7e79c/docstring_parser-0.15-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e82dea1dfc15b909cc660f657a3a9d698a2916b7f3b05535a2d72e8d7ea3ad5b",
"md5": "d2a30059fe0b6376d1964b6d9ffca35f",
"sha256": "48ddc093e8b1865899956fcc03b03e66bb7240c310fac5af81814580c55bf682"
},
"downloads": -1,
"filename": "docstring_parser-0.15.tar.gz",
"has_sig": false,
"md5_digest": "d2a30059fe0b6376d1964b6d9ffca35f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6,<4.0",
"size": 26768,
"upload_time": "2022-09-05T07:36:08",
"upload_time_iso_8601": "2022-09-05T07:36:08.139329Z",
"url": "https://files.pythonhosted.org/packages/e8/2d/ea1dfc15b909cc660f657a3a9d698a2916b7f3b05535a2d72e8d7ea3ad5b/docstring_parser-0.15.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-09-05 07:36:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "rr-",
"github_project": "docstring_parser",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "docstring-parser"
}