documented
Templated docstrings for Python classes.
Example
examples/open-the-pod-bay-doors.py
from dataclasses import dataclass
from documented import Documented, DocumentedError
@dataclass
class PodBayDoorsStillClosed(DocumentedError):
"""
Iβm sorry, {self.user_name}.
Iβm afraid I canβt do that.
"""
user_name: str
class OpenThePodBayDoors(Documented):
"""Open the pod bay doors please, HAL."""
print(OpenThePodBayDoors())
raise PodBayDoorsStillClosed(user_name='Dave')
python
Open the pod bay doors please, HAL.
Traceback (most recent call last):
File "π/open-the-pod-bay-doors.py", line 22, in <module>
raise PodBayDoorsStillClosed(user_name='Dave')
PodBayDoorsStillClosed: Iβm sorry, Dave.
Iβm afraid I canβt do that.
Installation
documented
is on PyPI.
pip install documented
poetry add documented
pipenv install documented
pdm add documented
conda install -c conda-forge documented
Flow
Used by
The asterisk below denotes projects which are mine
Linked Data workspace
Pythonic alternative to Make
Know more?
Let's talk
Bug? Feature request?
Anything else?
See my site: yeti.sh