constants

Common constants for the library.

Module Attributes

api_attribute_map

Mapping from library attribute names to names used in the API.

ATTRS_ALWAYS_EXCLUDE_FROM_DATA

Exclude non-data attributes from APIResource data columns.

DataAttributeType

Type of APIResource data attribute.

FILE_STRING_CHOICE

String valid for files parameter of download methods.

FileStringType

String used in files parameter of download methods.

NO_LIMIT

Fetches all filings that match the query.

PROTOTYPE

A special value for APIResource to construct a dummy instance.

YearFilterMonthsType

Months chosen when only a year is given in a date filter.

Classes

Prototype

Type of special value PROTOTYPE.

xbrl_filings_api.constants.api_attribute_map: dict[str, str] = {'added_time': 'date_added', 'api_id': 'id', 'country': 'country', 'error_count': 'error_count', 'filing_index': 'fxo_id', 'inconsistency_count': 'inconsistency_count', 'json_url': 'json_url', 'last_end_date': 'period_end', 'package_sha256': 'sha256', 'package_url': 'package_url', 'processed_time': 'processed', 'viewer_url': 'viewer_url', 'warning_count': 'warning_count', 'xhtml_url': 'report_url'}

Mapping from library attribute names to names used in the API.

It is used to convert fields in parameters sort and filters. Users should prefer to use keys of this dict in the two parameters.

The value is available if module request_processor or any module which uses it is imported (e.g. root package or query).

Accessible through the package root namespace.

xbrl_filings_api.constants.ATTRS_ALWAYS_EXCLUDE_FROM_DATA = {'entity', 'filing', 'filings', 'type', 'validation_messages'}

Exclude non-data attributes from APIResource data columns.

Exclude attributes whose value is a functional object or some sort of list from the data output.

xbrl_filings_api.constants.DataAttributeType

Type of APIResource data attribute.

alias of str | int | datetime | date | None

xbrl_filings_api.constants.FILE_STRING_CHOICE = ('json', 'package', 'xhtml')

String valid for files parameter of download methods.

xbrl_filings_api.constants.FileStringType

String used in files parameter of download methods.

alias of Literal[‘json’, ‘package’, ‘xhtml’]

xbrl_filings_api.constants.NO_LIMIT = 0

Fetches all filings that match the query.

Used as a value to the parameter limit.

Accessible through the package root namespace.

class xbrl_filings_api.constants.Prototype

Bases: object

Type of special value PROTOTYPE.

xbrl_filings_api.constants.PROTOTYPE = <xbrl_filings_api.constants.Prototype object>

A special value for APIResource to construct a dummy instance.

xbrl_filings_api.constants.YearFilterMonthsType

Months chosen when only a year is given in a date filter.

alias of tuple[tuple[int, int], tuple[int, int]]