options

General options for the library.

Module Attributes

browser

The web browser controller object used for Filing.open() method.

entry_point_url

API entry point URL for requests.

max_page_size

Maximum number of main resources to be fetched on a single page.

open_viewer

Open viewer instead of plain XHTML file on Filing.open() call.

timeout_sec

Maximum number of seconds to wait for response from the server.

views

SQLite3 views to be added to created/edited databases.

year_filter_months

Define queried months when filtering a date field by only a year.

xbrl_filings_api.options.browser: webbrowser.BaseBrowser | None = None

The web browser controller object used for Filing.open() method.

If value is None, it will be set when Filing.open() is called. Valid value can be created with webbrowser.get() function.

Default value is None.

xbrl_filings_api.options.entry_point_url: str = 'https://filings.xbrl.org/api'

API entry point URL for requests.

Default value is 'https://filings.xbrl.org/api/filings'.

xbrl_filings_api.options.max_page_size: int = 200

Maximum number of main resources to be fetched on a single page.

Defines the maximum number of filings to be retrieved in a single API response. If the functions are called by limiting the number of results with a parameter limit which is smaller than this value, page size will be set as limit instead.

Default value is 200.

xbrl_filings_api.options.open_viewer: bool = True

Open viewer instead of plain XHTML file on Filing.open() call.

Default value is True.

xbrl_filings_api.options.timeout_sec: float = 30.0

Maximum number of seconds to wait for response from the server.

Default value is 30.0.

xbrl_filings_api.options.views: Iterable[SQLiteView] | None = [SQLiteView(name='ViewEnclosure', required_tables=('Entity',)), SQLiteView(name='ViewFilingAge', required_tables=('Entity',)), SQLiteView(name='ViewNumericErrors', required_tables=('ValidationMessage', 'Entity'))]

SQLite3 views to be added to created/edited databases.

The SQLiteView.name attributes of objects may not be overlapping.

Default value is DEFAULT_VIEWS.

xbrl_filings_api.options.year_filter_months: YearFilterMonthsType = ((0, 1), (1, 1))

Define queried months when filtering a date field by only a year.

Two values of tuple are start and stop where start is inclusive and stop is exclusive. Inner tuples have two values where the first is year offset and the second is calendar-style month number.

Default value is ((0, 1), (1, 1)) which means from January 31 in specified year until December 31 in the same year.