Open ross-spencer opened 6 years ago
Hey @ross-spencer,
Yeah, we haven't implemented PREMIS element creation via attribute setting yet. I guess that would mean implementing __setattr__
. It would probably be a good idea to implement what you suggest, we just haven't done it yet.
For now, when creating a new PREMISElement (or subclass), you have to either supply the values on initialization or supply a single tuple to the data
kwarg:
>>> ev = premisrw.PREMISEvent(
... identifier_value='1665f868-dff5-4e66-8a32-f38ad7582309',
... ...)
>>> ev = PREMISEvent(data=('event', {...}, (...)))
See
Hi Joel,
Looking for clarification on how to write PREMIS events using this. If I try the following:
Then the default values for the object are output and no more:
I am currently only able to create an event object and output it to XML by creating a tuple using the technique outlined here.
I guess, am I missing something?