Source code for pycif.utils.classes.fields
from types import MethodType
from .baseclass import Plugin
[docs]
class Field(Plugin):
[docs]
@classmethod
def register_plugin(cls, name, version, module, subtype="", **kwargs):
"""Register a module for a plugin and version with possibly options
Args:
name (str): name of the plugin
version (str): version of the plugin
module (types.ModuleType): module defining the interface
between pyCIF and the plugin
plugin_type (str): type of plugin
**kwargs (dictionary): default options for module
"""
super(Field, cls).register_plugin(
name, version, module, plugin_type="field", subtype=subtype
)
[docs]
def initiate_template(self):
super(Field, self).initiate_template(
plg_type="field",
default_functions={"write": True, "read": True,
"fetch": False}
)