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

ParserForDynamicPlugins

CntlrCmdLine

.. class:: CntlrCmdLin()

Functions

main

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.

wsgiApplication

parseAndRun

interface used by Main program and py.test (arelle_test.py)

parseArgs

Parses the command line arguments and generates runtimeOptions and arellePluginModules

createCntlrAndPreloadPlugins

This function creates a cntlr and preloads all the necessary plugins.

configAndRunCntlr

This function creates and configures a controller based off an options dataclass and

filesourceEntrypointFiles

Data

API

arelle.CntlrCmdLine.STILL_ACTIVE

259

arelle.CntlrCmdLine.PROCESS_QUERY_INFORMATION

1024

arelle.CntlrCmdLine.DISABLE_PERSISTENT_CONFIG_OPTION

‘–disablePersistentConfig’

arelle.CntlrCmdLine.UILANG_OPTION

‘–uiLang’

arelle.CntlrCmdLine._: arelle.typing.TypeGetText

None

arelle.CntlrCmdLine.main()

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=[])
arelle.CntlrCmdLine.parseAndRun(args)

interface used by Main program and py.test (arelle_test.py)

arelle.CntlrCmdLine.parseArgs(args)

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, disablePersistentConfig, arellePluginModules) 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, arellePluginModules)

This function creates and configures a controller based off an options dataclass and

Parameters:
  • options – RuntimeOptions dataclass

  • arellePluginModules – a dictionary of commands and moduleInfos

Returns:

cntlr

arelle.CntlrCmdLine.filesourceEntrypointFiles(filesource, entrypointFiles=[], inlineOnly=False)
class arelle.CntlrCmdLine.ParserForDynamicPlugins(options)

Initialization

add_option(*args, **kwargs)
class arelle.CntlrCmdLine.CntlrCmdLine(logFileName=None, uiLang=None, disable_persistent_config=False)

Bases: arelle.Cntlr.Cntlr

.. class:: CntlrCmdLin()

Initialization sets up for platform via Cntlr.Cntlr.

Initialization

run(options: arelle.RuntimeOptions.RuntimeOptions, sourceZipStream=None, responseZipStream=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, realm)
showStatusOnPipe(message, clearAfter=None)
loadPackage(package: str, packageManifestName: str)
loadPackages(packages: list[str], packageManifestName: str)

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.