arelle.CntlrCmdLine¶
This module is Arelle’s controller in command line non-interactive mode
(This module can be a pattern for custom integration of Arelle into an application.)
See COPYRIGHT.md for copyright information.
Module Contents¶
Classes¶
.. class:: CntlrCmdLin() |
Functions¶
Main program to initiate application from command line or as a separate process (e.g, java Runtime.getRuntime().exec). May perform a command line request, or initiate a web server on specified local port. |
|
interface used by Main program and py.test (arelle_test.py) |
|
Some command line arguments influence the actual parsing of other arguments. This function pre-parses those arguments to allow for processing before full argument parseing occurs. |
|
Parses the command line arguments and generates runtimeOptions and arellePluginModules |
|
This function creates a cntlr and preloads all the necessary plugins. |
|
Data¶
API¶
- arelle.CntlrCmdLine.STILL_ACTIVE¶
259
- arelle.CntlrCmdLine.PROCESS_QUERY_INFORMATION¶
1024
- arelle.CntlrCmdLine.DISABLE_PERSISTENT_CONFIG_OPTION¶
‘–disablePersistentConfig’
- arelle.CntlrCmdLine.TESTCASE_EXPECTED_ERRORS_OPTION¶
‘testcaseExpectedErrors’
- arelle.CntlrCmdLine.UILANG_OPTION¶
‘–uiLang’
- arelle.CntlrCmdLine.main() None¶
Main program to initiate application from command line or as a separate process (e.g, java Runtime.getRuntime().exec). May perform a command line request, or initiate a web server on specified local port.
- Parameters:
argv –
Command line arguments. (Currently supported arguments can be displayed by the parameter –help.)
- type message:
[str]
- arelle.CntlrCmdLine.wsgiApplication(extraArgs: list[str] | None = None) CntlrCmdLine¶
- arelle.CntlrCmdLine.parseAndRun(args: list[str]) CntlrCmdLine¶
interface used by Main program and py.test (arelle_test.py)
- arelle.CntlrCmdLine.PREPARSE_ARG_CONFIGS¶
‘frozenset(…)’
- arelle.CntlrCmdLine.preparseArgs(args: list[str], parser: optparse.OptionParser) dict[str, str]¶
Some command line arguments influence the actual parsing of other arguments. This function pre-parses those arguments to allow for processing before full argument parseing occurs.
- Parameters:
args – Command line arguments
parser – OptionParser to report errors
- Returns:
Dictionary of pre-parsed options
- arelle.CntlrCmdLine.parseArgs(args: list[str]) tuple[arelle.RuntimeOptions.RuntimeOptions, dict[str, Any]]¶
Parses the command line arguments and generates runtimeOptions and arellePluginModules
- Parameters:
args – Command Line arguments
- Returns:
runtimeOptions which is an object of options specified and arellePluginModules which is a dictionary of commands and moduleInfos
- arelle.CntlrCmdLine.createCntlrAndPreloadPlugins(uiLang: str | None, disablePersistentConfig: bool, arellePluginModules: dict[str, Any]) CntlrCmdLine¶
This function creates a cntlr and preloads all the necessary plugins.
- Parameters:
uiLang – The UI Language
disablePersistentConfig – flag to determine if persistent configs should be ignored
arellePluginModules – a dictionary of commands and moduleInfos
- Returns:
cntlr
- arelle.CntlrCmdLine.configAndRunCntlr(options: arelle.RuntimeOptions.RuntimeOptions, arellePluginModules: dict[str, Any]) CntlrCmdLine¶
- class arelle.CntlrCmdLine.ParserForDynamicPlugins(options: arelle.RuntimeOptions.RuntimeOptions)¶
Initialization
- add_option(*args: Any, **kwargs: Any) None¶
- add_option_group(featureGroup: optparse.OptionGroup, *args: Any, **kwargs: Any) None¶
- class arelle.CntlrCmdLine.CntlrCmdLine(logFileName: arelle.Cntlr.TypeLogFileName | None = None, uiLang: str | None = None, disable_persistent_config: bool = False)¶
Bases:
arelle.Cntlr.Cntlr.. class:: CntlrCmdLin()
Initialization sets up for platform via Cntlr.Cntlr.
Initialization
- run(options: arelle.RuntimeOptions.RuntimeOptions, sourceZipStream: Any = None, responseZipStream: Any = None) bool¶
Process command line arguments or web service request, such as to load and validate an XBRL document, or start web server.
When a web server has been requested, this method may be called multiple times, once for each web service (REST) request that requires processing. Otherwise (when called for a command line request) this method is called only once for the command line arguments request.
- Parameters:
options (optparse.Values) – OptionParser options from parse_args of main argv arguments (when called from command line) or corresponding arguments from web service (REST) request.
- internet_user_password(host: str, realm: str) tuple[str, str]¶
- showStatusOnPipe(message: str | None, clearAfter: int | None = None) None¶
- loadPackage(package: str, packageManifestName: str) None¶
- loadPackages(packages: list[str], packageManifestName: str) None¶
Loads specified packages.
- Parameters:
packages – Pipe-separated list of options. See CLI documentation for ‘packages’.
packageManifestName – Unix shell style pattern used to find package manifest.