RaptorXML Python API v1 Documentation¶
- This is the original RaptorXML+XBRL Server Python API. It covers support to access the internal data model of RaptorXML+XBRL Server for:
The RaptorXML Python API v1 verion is enabled with the command line option --script-api-version=1
.
The API can be used through callback functions which are implemented in a Python script file.
-
on_xsi_valid
(job, instance)¶ This function is called after the command
valxml-withxsd --streaming=false
(xsi) has succeeded validating the instance document. The arguments are- job of type
Job
- instance of type
xsd.Instance
- job of type
-
on_xsd_valid
(job, schema)¶ This function is called after the command
valxsd
(xsd) has succeeded validating the schema document(s). The arguments are- job of type
Job
- schema of type
xsd.Schema
- job of type
-
on_dts_valid
(job, dts)¶ This function is called after the command
valdts
(dts) has succeeded validating the DTS. The arguments are
-
on_xbrl_valid
(job, instance)¶ This function is called after the command
valxbrl
(xbrl) has succeeded validating the XBRL instance document. The arguments are- job of type
Job
- instance of type
xbrl.Instance
- job of type
A Python script file is specified with the --script
option on the command line.
The callback functions are invoked only if the validation succeeds.
Script parameters for the above callback functions can be specified on the command line using the --script-param="KEY:VALUE"
option.
The --script-param
option can be specified multiple times. The specified script parameters are accessible in the Job.script_params
dictionary.