https://github.com/andrewpetrochenkov/readme-docstring.py
:book: generate README from python docstrings
https://github.com/andrewpetrochenkov/readme-docstring.py
cli python readme
Last synced: 3 months ago
JSON representation
:book: generate README from python docstrings
- Host: GitHub
- URL: https://github.com/andrewpetrochenkov/readme-docstring.py
- Owner: andrewpetrochenkov
- License: unlicense
- Created: 2019-03-08T20:53:49.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-03T21:20:18.000Z (over 4 years ago)
- Last Synced: 2025-02-26T09:42:00.652Z (3 months ago)
- Topics: cli, python, readme
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://pypi.org/project/readme-docstring/)
[](https://unlicense.org/)
[](https://github.com/andrewp-as-is/readme-docstring.py/actions)### Installation
```bash
$ [sudo] pip install readme-docstring
```#### Examples
example with [readme-generator](https://pypi.org/project/readme-generator/)
```python
class Readme(readme_generator.Readme):
order = [..., "classes", "functions", ...]def classes(self):
classes = self.getclasses()
return readme_docstring.Classes(classes)def functions(self):
functions = self.getfunctions()
return readme_docstring.Functions(functions)
```custom table
```python
class ExecutableModules(readme_docstring.Table):
columns = ["usage", "`__doc__`"]def __init__(self,modules):
self.objects = modulesdef getleftcell(self, obj):
default = "python -m %s" % obj.__name__.replace(".__main__", "")
return "`%s`" % getattr(obj, "USAGE", default)
```