erdantic.examples.attrs¶
Example data model classes using standard library's
dataclasses
module.
Adventurer
¶
A person often late for dinner but with a tale or two to tell.
Attributes:
Source code in erdantic/examples/attrs.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
Party
¶
A group of adventurers finding themselves doing and saying things altogether unexpected.
Attributes:
Source code in erdantic/examples/attrs.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
|
Quest
¶
A task to complete, with some monetary reward.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
Name by which this quest is referred to |
giver |
QuestGiver
|
Person who offered the quest |
reward_gold |
int
|
Amount of gold to be rewarded for quest completion |
Source code in erdantic/examples/attrs.py
55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
QuestGiver
¶
A person who offers a task that needs completing.
Attributes:
Source code in erdantic/examples/attrs.py
40 41 42 43 44 45 46 47 48 49 50 51 52 |
|