zope.annotation
API¶
Framework Interfaces¶
These interfaces define the source and targets for adaptation under the
zope.annotation
framework:
Annotations store arbitrary application data under package-unique keys.
Attribute-Based Annotations¶
The default adapter implementation uses a special attribute,
__annotations__
, on the annotated object:
- class zope.annotation.attribute.AttributeAnnotations(obj, context=None)[source]¶
Store annotations on an object
Store annotations in the __annotations__ attribute on a IAttributeAnnotatable object.
Because setting an attribute is somewhat intrusive (as opposed to storing
annotations elsewhere), this adapter requires that its context implment
zope.annotation.interfaces.IAttributeAnnotatable
to signal that this attribute can be used.
Factories¶
Annotation factory helper