beta.xbrl.xule.Session
¶
The beta.xbrl.xule.Session
class represents a separated execution environment of the XULE processor.
-
class
beta.xbrl.xule.
Session
¶ Creates a new
beta.xbrl.xule.Session
object.
Class methods¶
-
classmethod
beta.xbrl.xule.Session.
default
(type cls)¶ Returns a
beta.xbrl.xule.Session
object which represents the default session.
Methods¶
-
beta.xbrl.xule.Session.
clear
()¶ Clears all data and caches stored in this session.
-
beta.xbrl.xule.Session.
clear_data_cache
()¶ Clears the cache of loaded external files using the csv-data(url) and json-data(url) functions.
-
beta.xbrl.xule.Session.
clear_profiling_data
()¶ Clears any stored profiling information.
-
beta.xbrl.xule.Session.
clear_taxonomy_cache
()¶ Clears the cache of loaded external taxonomies using the taxonomy(url) function.
-
beta.xbrl.xule.Session.
execute
(ruleset, Instance instance, *, catalog=None, rules_to_process=None, stack_size=None, use_namespaces_from_instance=None, enable_profiling=None, **kargs)¶ Executes the given XULE ruleset against an XBRL instance and returns a list of
beta.xbrl.xule.Result
objects that represent the assertion and output rule results. Argument ruleset can be either a beta.xbrl.RuleSet or beta.xbrl.RuleSetMap object. Raises abeta.xbrl.xule.:obj:`RuntimeError`
exception when an error is encountered.
-
beta.xbrl.xule.Session.
execute_expression
(expr, Instance instance=None, *, constants=None, catalog=None, stack_size=None, namespaces=None, use_namespaces_from_instance=True, enable_profiling=None, **kargs)¶ Executes a simple XULE expression against an XBRL instance and returns a list of
beta.xbrl.xule.Result
objects that represent the output results. Raises abeta.xbrl.xule.:obj:`RuntimeError`
exception when an error is encountered.
-
beta.xbrl.xule.Session.
preevaluate_constants
(RuleSet ruleset, *, constants=None, catalog=None, stack_size=None, **kargs)¶ Evaluates all constant expressions defined in this XULE ruleset and caches the values. If an error is raised during execution, no value for that constant will be cached. To evaluate only specific constants specify the constant name or a list of constant names.
-
beta.xbrl.xule.Session.
profile_stats
(Expression expr)¶ Returns a
beta.xbrl.xule.ProfileStats
object which represents the profiler statistics for the given XULE expression.
Special methods¶
__eq__, __ge__, __gt__, __le__, __lt__, __ne__