gavo.svcs.customcore module

User-defined cores, either with an external file or with code within the RD.

class gavo.svcs.customcore.CoreProc(parent, **kwargs)[source]

Bases: ProcApp

A definition of a pythonCore’s functionalty.

This is a procApp complete with setup and code; you could inherit between these.

coreProcs see the embedding service, the input table passed, and the query metadata as service, inputTable, and queryMeta, respectively.

The core itself is available as self.

additionalNamesForProcs = {'rsc': <module 'gavo.rsc' from '/home/msdemlei/gavo/trunk/gavo/rsc/__init__.py'>}
attrSeq = [<gavo.base.complexattrs.StructListAttribute object>, <gavo.base.attrdef.UnicodeAttribute object>, <gavo.base.attrdef.UnicodeAttribute object>, <gavo.base.attrdef.UnicodeAttribute object>, <gavo.base.parsecontext.IdAttribute object>, <gavo.base.attrdef.UnicodeAttribute object>, <gavo.base.parsecontext.OriginalAttribute object>, <gavo.base.parsecontext.ReferenceAttribute object>, <gavo.base.complexattrs.StructListAttribute object>, <gavo.base.attrdef.EnumeratedUnicodeAttribute object>]
completedCallbacks = []
formalArgs = 'self, service, inputTable, queryMeta'
managedAttrs = {'bind': <gavo.base.complexattrs.StructListAttribute object>, 'bindings': <gavo.base.complexattrs.StructListAttribute object>, 'code': <gavo.base.attrdef.UnicodeAttribute object>, 'deprecated': <gavo.base.attrdef.UnicodeAttribute object>, 'doc': <gavo.base.attrdef.UnicodeAttribute object>, 'id': <gavo.base.parsecontext.IdAttribute object>, 'name': <gavo.base.attrdef.UnicodeAttribute object>, 'original': <gavo.base.parsecontext.OriginalAttribute object>, 'procDef': <gavo.base.parsecontext.ReferenceAttribute object>, 'setup': <gavo.base.complexattrs.StructListAttribute object>, 'setups': <gavo.base.complexattrs.StructListAttribute object>, 'type': <gavo.base.attrdef.EnumeratedUnicodeAttribute object>}
name_ = 'coreProc'
requiredType = 'coreProc'
class gavo.svcs.customcore.CustomCore(parent, **kwargs)[source]

Bases: Core

A wrapper around a core defined in a module.

This core lets you write your own cores in modules.

The module must define a class Core. When the custom core is encountered, this class will be instantiated and will be used instead of the CustomCore, so your code should probably inherit core.Core.

See `Writing Custom Cores`_ for details.

attrSeq = [<gavo.base.parsecontext.IdAttribute object>, <gavo.base.complexattrs.StructAttribute object>, <gavo.rscdef.common.ResdirRelativeAttribute object>, <gavo.base.parsecontext.OriginalAttribute object>, <gavo.base.complexattrs.StructAttribute object>, <gavo.base.complexattrs.PropertyAttribute object>, <gavo.rscdef.common.RDAttribute object>]
clearProperty(name)
completeElement(ctx)[source]
completedCallbacks = []
getFullId()
getProperty(name, default=<Undefined>)
hasProperty(name)
managedAttrs = {'id': <gavo.base.parsecontext.IdAttribute object>, 'inputTable': <gavo.base.complexattrs.StructAttribute object>, 'module': <gavo.rscdef.common.ResdirRelativeAttribute object>, 'original': <gavo.base.parsecontext.OriginalAttribute object>, 'outputTable': <gavo.base.complexattrs.StructAttribute object>, 'properties': <gavo.base.complexattrs.PropertyAttribute object>, 'property': <gavo.base.complexattrs.PropertyAttribute object>, 'rd': <gavo.rscdef.common.RDAttribute object>}
property module
name_ = 'customCore'
onElementComplete()[source]
property rd
setProperty(name, value)
class gavo.svcs.customcore.PythonCore(parent, **kwargs)[source]

Bases: Core

A core doing computation using a piece of python.

See `Python Cores instead of Custom Cores`_ in the reference.

attrSeq = [<gavo.base.complexattrs.StructAttribute object>, <gavo.base.parsecontext.IdAttribute object>, <gavo.base.complexattrs.StructAttribute object>, <gavo.base.parsecontext.OriginalAttribute object>, <gavo.base.complexattrs.StructAttribute object>, <gavo.base.complexattrs.PropertyAttribute object>, <gavo.rscdef.common.RDAttribute object>]
clearProperty(name)
completedCallbacks = []
expand(s)[source]
getFullId()
getProperty(name, default=<Undefined>)
hasProperty(name)
managedAttrs = {'coreProc': <gavo.base.complexattrs.StructAttribute object>, 'id': <gavo.base.parsecontext.IdAttribute object>, 'inputTable': <gavo.base.complexattrs.StructAttribute object>, 'original': <gavo.base.parsecontext.OriginalAttribute object>, 'outputTable': <gavo.base.complexattrs.StructAttribute object>, 'properties': <gavo.base.complexattrs.PropertyAttribute object>, 'property': <gavo.base.complexattrs.PropertyAttribute object>, 'rd': <gavo.rscdef.common.RDAttribute object>}
name_ = 'pythonCore'
property rd
run(service, inputTable, queryMeta)[source]
setProperty(name, value)