add_attribute
Add a typed key/value attribute to a Gramps object, automatically using SrcAttribute for sources/citations and Attribute for other record types.
Instructions
Add a typed key/value attribute to an object.
Sources and citations use a SrcAttribute; everything else uses an Attribute. The right class is chosen automatically from object_type.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Attribute type/name, e.g. 'Occupation', 'National ID'. | |
| value | Yes | Attribute value, e.g. 'Blacksmith'. | |
| target | Yes | Handle or gramps_id of the object. | |
| object_type | Yes | Type of the object: 'person', 'event', 'family', 'media', 'source', 'citation'. |