beta.xbrl.xule
¶
The beta.xbrl.xule
module provides an API for the XULE language. The API allows rules written in XULE to parsed and executed.
Classes¶
beta.xbrl.xule.ArgumentError
beta.xbrl.xule.Assertion
beta.xbrl.xule.Bool
beta.xbrl.xule.CancelError
beta.xbrl.xule.Concept
beta.xbrl.xule.ConstantDeclaration
beta.xbrl.xule.Cube
beta.xbrl.xule.Decimal
beta.xbrl.xule.Dict
beta.xbrl.xule.Dimension
beta.xbrl.xule.DivisionByZero
beta.xbrl.xule.Duration
beta.xbrl.xule.Entity
beta.xbrl.xule.Exception
beta.xbrl.xule.Expression
beta.xbrl.xule.Fact
beta.xbrl.xule.Float
beta.xbrl.xule.FunctionArgument
beta.xbrl.xule.FunctionDeclaration
beta.xbrl.xule.Instant
beta.xbrl.xule.Int
beta.xbrl.xule.Label
beta.xbrl.xule.List
beta.xbrl.xule.Location
beta.xbrl.xule.NamespaceDeclaration
beta.xbrl.xule.Network
beta.xbrl.xule.OutputAttribute
beta.xbrl.xule.OutputAttributeDeclaration
beta.xbrl.xule.OutputRule
beta.xbrl.xule.ParseError
beta.xbrl.xule.ProfileStats
beta.xbrl.xule.QName
beta.xbrl.xule.Reference
beta.xbrl.xule.ReferencePart
beta.xbrl.xule.Relationship
beta.xbrl.xule.Result
beta.xbrl.xule.Role
beta.xbrl.xule.RuleNamePrefix
beta.xbrl.xule.RuleNameSeparator
beta.xbrl.xule.RuleSet
beta.xbrl.xule.RuleSetMap
beta.xbrl.xule.RuntimeError
beta.xbrl.xule.Session
beta.xbrl.xule.Set
beta.xbrl.xule.SourceLocation
beta.xbrl.xule.StackOverflow
beta.xbrl.xule.String
beta.xbrl.xule.Taxonomy
beta.xbrl.xule.TimePeriod
beta.xbrl.xule.Type
beta.xbrl.xule.TypeError
beta.xbrl.xule.URI
beta.xbrl.xule.Unit
beta.xbrl.xule.UnknownAspect
beta.xbrl.xule.UnknownAspectProperty
beta.xbrl.xule.UnknownConcept
beta.xbrl.xule.UnknownFunction
beta.xbrl.xule.UnknownPrefix
beta.xbrl.xule.UnknownProperty
beta.xbrl.xule.UnknownVariable
beta.xbrl.xule.Value
beta.xbrl.xule.VersionDeclaration
Functions¶
-
beta.xbrl.xule.
compile
(ruleset, *, catalog=None, **kargs)¶ Returns a
beta.xbrl.xule.RuleSet
object that represents the compiled rule set in the given XULE source code. Argument ruleset can be either a XULE source string or buffer. Abeta.xbrl.xule.:obj:`ParseError`
exception is raised if a syntax error is encountered during parsing.
-
beta.xbrl.xule.
execute
(ruleset, *, Instance instance=None, Session session=None, catalog=None, rules_to_process=None, stack_size=None, use_namespaces_from_instance=None, **kargs)¶ Executes the given XULE source code and returns a list of
beta.xbrl.xule.Result
objects that represent the assertion and output rule results. Argument ruleset can be either a XULE source string or buffer or beta.xbrl.RuleSet and beta.xbrl.RuleSetMap objects. The default XULE session is used if no session is explicitly specified. Raises abeta.xbrl.xule.:obj:`ParseError`
orbeta.xbrl.xule.:obj:`RuntimeError`
exception when an error is encountered during compilation or execution.
-
beta.xbrl.xule.
execute_expression
(expr, *, Instance instance=None, Session session=None, catalog=None, stack_size=None, use_namespaces_from_instance=True, **kargs)¶ Executes a simple XULE expression and returns a list of
beta.xbrl.xule.Result
objects that represent the assertion and output rule results. The default XULE session is used if no session is explicitly specified. Raises abeta.xbrl.xule.:obj:`ParseError`
orbeta.xbrl.xule.:obj:`RuntimeError`
exception when an error is encountered during compilation or execution.
Enum Classes¶
-
class
beta.xbrl.xule.
AssertionSatisfiedType
¶ The beta.xbrl.taxonomy.AssertionSatisfiedType enumeration represents the type of an XULE assertion.
SATISFIED The assertion is triggered when the rule condition evaluates to true UNSATISFIED The assertion is triggered when the rule condition evaluates to false
-
class
beta.xbrl.xule.
ExpressionType
¶ The beta.xbrl.taxonomy.ExpressionType enumeration represents the types of expressions in a XULE parse tree.
ADDEXPR ADDEXPR ANDEXPR ANDEXPR ASPECTFILTER ASPECTFILTER ASPECTNAME ASPECTNAME BALANCE BALANCE BALANCE BALANCE BASESTRING BASESTRING BLOCKEXPR BLOCKEXPR BOOLEAN BOOLEAN COMPEXPR COMPEXPR CONSTANTDECLARATION CONSTANTDECLARATION DICTEXPR DICTEXPR ELSEIF ELSEIF ESCAPE ESCAPE FACTSET FACTSET FILTER FILTER FLOAT FLOAT FOREXPR FOREXPR FUNCTIONARG FUNCTIONARG FUNCTIONDECLARATION FUNCTIONDECLARATION FUNCTIONREFERENCE FUNCTIONREFERENCE IFEXPR IFEXPR INEXPR INEXPR INDEXEXPR INDEXEXPR INTEGER INTEGER INTERSECTEXPR INTERSECTEXPR ITEM ITEM LISTEXPR LISTEXPR MULTEXPR MULTEXPR NAVIGATION NAVIGATION NONE NONE NOTEXPR NOTEXPR NAMESPACEDECLARATION NAMESPACEDECLARATION OREXPR OREXPR OUTPUTATTRIBUTE OUTPUTATTRIBUTE OUTPUTRULE OUTPUTRULE PERIOD PERIOD PERIODTYPE PERIODTYPE PROPERTY PROPERTY PROPERTYEXPR PROPERTYEXPR QNAME QNAME OUTPUTATTRIBUTEDECLARATION OUTPUTATTRIBUTEDECLARATION RETURNEXPR RETURNEXPR RIGHTOPERATION RIGHTOPERATION RULENAMEPREFIX RULENAMEPREFIX RULENAMESEPARATOR RULENAMESEPARATOR SETEXPR SETEXPR SEVERITY SEVERITY STRING STRING SYMMETRICDIFFERENCEEXPR SYMMETRICDIFFERENCEEXPR TAGGEDEXPR TAGGEDEXPR TAGREF TAGREF VARDECLARATION VARDECLARATION VARREF VARREF VERSIONDECLARATION VERSIONDECLARATION UNARYEXPR UNARYEXPR
-
class
beta.xbrl.xule.
Severity
¶ The
beta.xbrl.xule.Severity
enumeration represents the severity of a XULE assertion.
-
Severity.
ERROR
¶ ERROR
-
Severity.
OK
¶ OK
-
Severity.
WARNING
¶ WARNING