High-level API¶
High-level interface provides object-oriented way to deal with the DSW data
entities. There are currently 6 of these, accessible on instances of the
DataStewardshipWizardSDK
:
app_config
documents
packages
questionnaires
templates
users
See API reference of respective classes for more info and examples on usage:
Models¶
There is a Model
class for each entity (except package) which
can be also used directly. This is useful if you already have the data of the
entity, but not the model, so have to instantiate it yourself:
# Somehow you got all the data of a user
user_data = ...
# You must pass also the `DataStewardshipWizardSDK` instance to the model;
# argument `__update_attrs` is used to instantiate the model and to put it
# in the right state
user = User(dsw_sdk, __update_attrs=user_data)
# You can also use the `_update_attrs` method, it's the same
user = User(dsw_sdk)
user._update_attrs(user_data)