More documentation will hopefully be added to this later. Always check the API auto-docs for the latest insights into how to use this module.
Adding metadata requires the following steps:
By default, the metadata of a subject model can be accessed through the MetadataSubjectMixin.metadata pseudo-field, which retrieves a dict-like object of all active metadata strands on that field. A method MetadataSubjectMixin.metadata_at() allows finer-grained control over this object, including overriding the current reference date (to look at historical or future metadata).
Each strand can then also be accessed like a dict, with metadata accessed via its key’s name, ID or the key object itself as the dict key.
The first strand defined on a model is special: it by default serves as the fallback for any attribute requests on the subject itself. This allows you to specify, for example, foo.title instead of foo.metadata['text']['title'], and should help with migration to the metadata system from discrete fields.