xbrl_us.utils package#
Submodules#
xbrl_us.utils.exceptions module#
xbrl_us.utils.paramters module#
- class xbrl_us.utils.paramters.Parameters(concept_id: int | None = None, concept_is_base: bool | None = None, concept_is_monetary: bool | None = None, concept_local_name: List[str] | None = None, concept_namespace: str | None = None, dimension_is_base: bool | None = None, dimension_local_name: List[str] | None = None, dimension_namespace: str | None = None, dimensions_count: List[int] | None = None, dimensions_id: str | None = None, dts_entry_point: str | None = None, dts_id: List[int] | None = None, dts_target_namespace: str | None = None, entity_cik: List[str] | None = None, entity_id: List[int] | None = None, fact_has_dimensions: bool | None = None, fact_hash: str | None = None, fact_id: List[int] | None = None, fact_is_extended: bool | None = None, fact_text_search: str | None = None, fact_ultimus: bool | None = None, fact_ultimus_index: List[int] | None = None, fact_value: str | None = None, fact_value_link: str | None = None, member_is_base: bool | None = None, member_local_name: List[str] | None = None, member_typed_value: List[str] | None = None, member_member_value: List[str] | None = None, member_namespace: str | None = None, period_calendar_period: List[str] | None = None, period_fiscal_id: str | None = None, period_fiscal_period: List[str] | None = None, period_fiscal_year: List[int] | None = None, period_id: str | None = None, period_year: List[int] | None = None, report_accession: str | None = None, report_creation_software: str | None = None, report_document_type: List[str] | None = None, report_document_index: List[int] | None = None, report_entry_url: str | None = None, report_id: List[int] | None = None, report_restated: bool | None = None, report_restated_index: List[int] | None = None, report_sec_url: str | None = None, report_sic_code: List[str] | None = None, report_source_id: int | None = None, report_source_name: str | None = None, unit: List[str] | None = None)[source]#
Bases:
object
A class representing the parameters for searching XBRL data.
- Parameters:
concept_id (Optional[Union[int, List[int]]]) – A unique integer or list of integers representing concept IDs that can be searched. This is a faster way to retrieve the details of a fact, but it is namespace specific and will only search for the use of a concept for a specific schema.
concept_is_base (Optional[bool]) – A boolean value indicating if the concept is a base element in the reporting taxonomy or a company extension.
concept_is_monetary (Optional[bool]) – A boolean value indicating if the concept is a monetary element.
concept_local_name (Optional[List[str]]) – A list of strings representing the local names of the concepts in the base schema of a taxonomy, excluding the namespace. Use this to search across multiple taxonomies where the local name is known to be consistent over time.
concept_namespace (Optional[str]) – The namespace of the concept used to identify a fact.
dimension_is_base (Optional[bool]) – A boolean value indicating if the dimension (aspect) is a base element in the reporting taxonomy or a company extension.
dimension_local_name (Optional[List[str]]) – A list of strings representing the local names of the dimensions used with the fact.
dimension_namespace (Optional[str]) – The namespace of the dimension used with the fact.
dimensions_count (Optional[List[int]]) – A list of integers representing the number of dimensional qualifiers associated with a given fact. A comma-delimited list will return facts with 0, 1, 2, etc. dimensions.
dimensions_id (Optional[str]) – The ID of the dimension.
dts_entry_point (Optional[str]) – The URL entry point of a discoverable taxonomy set (DTS). A taxonomy can have multiple entry points, and the resulting set of taxonomies using an entry point is called a DTS.
dts_id (Optional[List[int]]) – A list of integers representing the unique identifiers for a given group of taxonomies. XBRL facts and linkbases are typically associated with a given report that is associated with a DTS.
dts_target_namespace (Optional[str]) – The target namespace of a discoverable taxonomy set (DTS).
entity_cik (Optional[List[str]]) – A list of strings representing the SEC identifiers used to identify reporting entities. This is the CIK associated with a given fact, DTS, or report.
entity_id (Optional[List[int]]) – A list of integers representing the internal identifiers used to identify entities. This will be replaced with the LEI when the SEC supports the LEI standard.
fact_has_dimensions (Optional[bool]) – A boolean field indicating if the fact has any dimensions associated with it.
fact_hash (Optional[str]) – The fact hash derived from the aspect properties of the fact. Each fact will have a different hash in a given report. Over time, different facts may have the same hash if they are identical. The hash does not take into account the value reported for the fact. The fact hash is used to determine the ultimus index. By searching on the hash, you can identify all identical facts that were reported.
fact_id (Optional[List[int]]) – A list of integers representing the internal identifiers used to identify facts.
fact_is_extended (Optional[bool]) – A boolean value indicating if the fact is comprised of either an extension concept, extension axis, or extension member.
fact_text_search (Optional[str]) – A string used to search for specific text within the fact value data. The XBRL API uses the Sphinx search engine for text search.
fact_ultimus (Optional[bool]) – A boolean indicating if the fact is the latest value reported. A value of True represents the latest value reported, while a value of False indicates that the value has been superseded by a more recent fact.
fact_ultimus_index (Optional[List[int]]) – A list of integers representing the incarnation of the fact. The same fact may be reported many times, and the ultimus index represents the reverse order of incarnation for the fact’s reporting. A value of 1 indicates that this is the latest value of the fact, while a higher value indicates that the value has been reported multiple times subsequent to the fact’s most recent reporting.
fact_value (Optional[str]) – The value of the fact as a text value. This includes numerical as well as non-numerical values reported.
fact_value_link (Optional[str]) – A URL to the rendered fact value data. For data encoded as HTML, the URL will display the formatted data excerpted from the full report.
member_is_base (Optional[bool]) – A boolean value indicating if the member is a base element in the reporting taxonomy or a company extension.
member_local_name (Optional[List[str]]) – A list of strings representing the local names of the members.
member_typed_value (Optional[List[str]]) – A list of strings representing the typed member values.
member_member_value (Optional[List[str]]) – A list of strings representing the typed member or explicit member values.
member_namespace (Optional[str]) – The namespace of the member.
period_calendar_period (Optional[List[str]]) – A list of strings representing the period identifiers for the fact. Examples include year (Y), quarters (Q1, Q2, Q3, Q4), cumulative quarters (3QCUM), and half years (H1, H2).
period_fiscal_id (Optional[str]) – The identifier of the fiscal period. Each period has an assigned hash that identifies the fiscal period. The hash can be used to search for identical periods.
period_fiscal_period (Optional[List[str]]) – A list of strings representing the fiscal periods.
period_fiscal_year (Optional[List[int]]) – A list of integers representing the fiscal years.
period_id (Optional[str]) – The ID of the period.
period_year (Optional[List[int]]) – A list of integers representing the years.
report_accession (Optional[str]) – The accession number of the report.
report_creation_software (Optional[str]) – The software used to create the report.
report_document_type (Optional[List[str]]) – A list of strings representing the document types of the report.
report_document_index (Optional[List[int]]) – A list of integers representing the document indexes of the report.
report_entry_url (Optional[str]) – The URL entry point of the report.
report_id (Optional[List[int]]) – A list of integers representing the internal identifiers used to identify the report.
report_restated (Optional[bool]) – A boolean indicating if the report has been restated.
report_restated_index (Optional[List[int]]) – A list of integers representing the indexes of restated reports.
report_sec_url (Optional[str]) – The URL of the report on the SEC website.
report_sic_code (Optional[List[str]]) – A list of strings representing the Standard Industrial Classification (SIC) codes of the report.
report_source_id (Optional[int]) – The source identifier of the report.
report_source_name (Optional[str]) – The source name of the report.
unit (Optional[List[str]]) – A list of strings representing the units.
- property concept_id#
- property concept_is_base#
- property concept_is_monetary#
- property concept_local_name#
- property concept_namespace#
- property dimension_is_base#
- property dimension_local_name#
- property dimension_namespace#
- property dimensions_count#
- property dimensions_id#
- property dts_entry_point#
- property dts_id#
- property dts_target_namespace#
- property entity_cik#
- property entity_id#
- property fact_has_dimensions#
- property fact_hash#
- property fact_id#
- property fact_is_extended#
- property fact_text_search#
- property fact_ultimus#
- property fact_ultimus_index#
- property fact_value#
- property fact_value_link#
- property member_is_base#
- property member_local_name#
- property member_member_value#
- property member_namespace#
- property member_typed_value#
- property period_calendar_period#
- property period_fiscal_id#
- property period_fiscal_period#
- property period_fiscal_year#
- property period_id#
- property period_year#
- property report_accession#
- property report_creation_software#
- property report_document_index#
- property report_document_type#
- property report_entry_url#
- property report_id#
- property report_restated#
- property report_restated_index#
- property report_sec_url#
- property report_sic_code#
- property report_source_id#
- property report_source_name#
- property unit#
Module contents#
- class xbrl_us.utils.Fields[source]#
Bases:
object
- CONCEPT_LOCAL_NAME = 'concept.local-name'#
- ENTITY_CIK = 'entity.cik'#
- ENTITY_ID = 'entity.id'#
- ENTITY_NAME = 'entity.name'#
- FACT_ID = 'fact.id'#
- FACT_ULTIMUS = 'fact.ultimus'#
- FACT_VALUE = 'fact.value'#
- PERIOD_END = 'period.end'#
- PERIOD_FISCAL_PERIOD = 'period.fiscal-period'#
- PERIOD_FISCAL_YEAR = 'period.fiscal-year'#
- REPORT_ACCESSION = 'report.accession'#
- REPORT_SIC_CODE = 'report.sic-code'#
- UNIT = 'unit'#
- class xbrl_us.utils.Parameters(concept_id: int | None = None, concept_is_base: bool | None = None, concept_is_monetary: bool | None = None, concept_local_name: List[str] | None = None, concept_namespace: str | None = None, dimension_is_base: bool | None = None, dimension_local_name: List[str] | None = None, dimension_namespace: str | None = None, dimensions_count: List[int] | None = None, dimensions_id: str | None = None, dts_entry_point: str | None = None, dts_id: List[int] | None = None, dts_target_namespace: str | None = None, entity_cik: List[str] | None = None, entity_id: List[int] | None = None, fact_has_dimensions: bool | None = None, fact_hash: str | None = None, fact_id: List[int] | None = None, fact_is_extended: bool | None = None, fact_text_search: str | None = None, fact_ultimus: bool | None = None, fact_ultimus_index: List[int] | None = None, fact_value: str | None = None, fact_value_link: str | None = None, member_is_base: bool | None = None, member_local_name: List[str] | None = None, member_typed_value: List[str] | None = None, member_member_value: List[str] | None = None, member_namespace: str | None = None, period_calendar_period: List[str] | None = None, period_fiscal_id: str | None = None, period_fiscal_period: List[str] | None = None, period_fiscal_year: List[int] | None = None, period_id: str | None = None, period_year: List[int] | None = None, report_accession: str | None = None, report_creation_software: str | None = None, report_document_type: List[str] | None = None, report_document_index: List[int] | None = None, report_entry_url: str | None = None, report_id: List[int] | None = None, report_restated: bool | None = None, report_restated_index: List[int] | None = None, report_sec_url: str | None = None, report_sic_code: List[str] | None = None, report_source_id: int | None = None, report_source_name: str | None = None, unit: List[str] | None = None)[source]#
Bases:
object
A class representing the parameters for searching XBRL data.
- Parameters:
concept_id (Optional[Union[int, List[int]]]) – A unique integer or list of integers representing concept IDs that can be searched. This is a faster way to retrieve the details of a fact, but it is namespace specific and will only search for the use of a concept for a specific schema.
concept_is_base (Optional[bool]) – A boolean value indicating if the concept is a base element in the reporting taxonomy or a company extension.
concept_is_monetary (Optional[bool]) – A boolean value indicating if the concept is a monetary element.
concept_local_name (Optional[List[str]]) – A list of strings representing the local names of the concepts in the base schema of a taxonomy, excluding the namespace. Use this to search across multiple taxonomies where the local name is known to be consistent over time.
concept_namespace (Optional[str]) – The namespace of the concept used to identify a fact.
dimension_is_base (Optional[bool]) – A boolean value indicating if the dimension (aspect) is a base element in the reporting taxonomy or a company extension.
dimension_local_name (Optional[List[str]]) – A list of strings representing the local names of the dimensions used with the fact.
dimension_namespace (Optional[str]) – The namespace of the dimension used with the fact.
dimensions_count (Optional[List[int]]) – A list of integers representing the number of dimensional qualifiers associated with a given fact. A comma-delimited list will return facts with 0, 1, 2, etc. dimensions.
dimensions_id (Optional[str]) – The ID of the dimension.
dts_entry_point (Optional[str]) – The URL entry point of a discoverable taxonomy set (DTS). A taxonomy can have multiple entry points, and the resulting set of taxonomies using an entry point is called a DTS.
dts_id (Optional[List[int]]) – A list of integers representing the unique identifiers for a given group of taxonomies. XBRL facts and linkbases are typically associated with a given report that is associated with a DTS.
dts_target_namespace (Optional[str]) – The target namespace of a discoverable taxonomy set (DTS).
entity_cik (Optional[List[str]]) – A list of strings representing the SEC identifiers used to identify reporting entities. This is the CIK associated with a given fact, DTS, or report.
entity_id (Optional[List[int]]) – A list of integers representing the internal identifiers used to identify entities. This will be replaced with the LEI when the SEC supports the LEI standard.
fact_has_dimensions (Optional[bool]) – A boolean field indicating if the fact has any dimensions associated with it.
fact_hash (Optional[str]) – The fact hash derived from the aspect properties of the fact. Each fact will have a different hash in a given report. Over time, different facts may have the same hash if they are identical. The hash does not take into account the value reported for the fact. The fact hash is used to determine the ultimus index. By searching on the hash, you can identify all identical facts that were reported.
fact_id (Optional[List[int]]) – A list of integers representing the internal identifiers used to identify facts.
fact_is_extended (Optional[bool]) – A boolean value indicating if the fact is comprised of either an extension concept, extension axis, or extension member.
fact_text_search (Optional[str]) – A string used to search for specific text within the fact value data. The XBRL API uses the Sphinx search engine for text search.
fact_ultimus (Optional[bool]) – A boolean indicating if the fact is the latest value reported. A value of True represents the latest value reported, while a value of False indicates that the value has been superseded by a more recent fact.
fact_ultimus_index (Optional[List[int]]) – A list of integers representing the incarnation of the fact. The same fact may be reported many times, and the ultimus index represents the reverse order of incarnation for the fact’s reporting. A value of 1 indicates that this is the latest value of the fact, while a higher value indicates that the value has been reported multiple times subsequent to the fact’s most recent reporting.
fact_value (Optional[str]) – The value of the fact as a text value. This includes numerical as well as non-numerical values reported.
fact_value_link (Optional[str]) – A URL to the rendered fact value data. For data encoded as HTML, the URL will display the formatted data excerpted from the full report.
member_is_base (Optional[bool]) – A boolean value indicating if the member is a base element in the reporting taxonomy or a company extension.
member_local_name (Optional[List[str]]) – A list of strings representing the local names of the members.
member_typed_value (Optional[List[str]]) – A list of strings representing the typed member values.
member_member_value (Optional[List[str]]) – A list of strings representing the typed member or explicit member values.
member_namespace (Optional[str]) – The namespace of the member.
period_calendar_period (Optional[List[str]]) – A list of strings representing the period identifiers for the fact. Examples include year (Y), quarters (Q1, Q2, Q3, Q4), cumulative quarters (3QCUM), and half years (H1, H2).
period_fiscal_id (Optional[str]) – The identifier of the fiscal period. Each period has an assigned hash that identifies the fiscal period. The hash can be used to search for identical periods.
period_fiscal_period (Optional[List[str]]) – A list of strings representing the fiscal periods.
period_fiscal_year (Optional[List[int]]) – A list of integers representing the fiscal years.
period_id (Optional[str]) – The ID of the period.
period_year (Optional[List[int]]) – A list of integers representing the years.
report_accession (Optional[str]) – The accession number of the report.
report_creation_software (Optional[str]) – The software used to create the report.
report_document_type (Optional[List[str]]) – A list of strings representing the document types of the report.
report_document_index (Optional[List[int]]) – A list of integers representing the document indexes of the report.
report_entry_url (Optional[str]) – The URL entry point of the report.
report_id (Optional[List[int]]) – A list of integers representing the internal identifiers used to identify the report.
report_restated (Optional[bool]) – A boolean indicating if the report has been restated.
report_restated_index (Optional[List[int]]) – A list of integers representing the indexes of restated reports.
report_sec_url (Optional[str]) – The URL of the report on the SEC website.
report_sic_code (Optional[List[str]]) – A list of strings representing the Standard Industrial Classification (SIC) codes of the report.
report_source_id (Optional[int]) – The source identifier of the report.
report_source_name (Optional[str]) – The source name of the report.
unit (Optional[List[str]]) – A list of strings representing the units.
- property concept_id#
- property concept_is_base#
- property concept_is_monetary#
- property concept_local_name#
- property concept_namespace#
- property dimension_is_base#
- property dimension_local_name#
- property dimension_namespace#
- property dimensions_count#
- property dimensions_id#
- property dts_entry_point#
- property dts_id#
- property dts_target_namespace#
- property entity_cik#
- property entity_id#
- property fact_has_dimensions#
- property fact_hash#
- property fact_id#
- property fact_is_extended#
- property fact_text_search#
- property fact_ultimus#
- property fact_ultimus_index#
- property fact_value#
- property fact_value_link#
- property member_is_base#
- property member_local_name#
- property member_member_value#
- property member_namespace#
- property member_typed_value#
- property period_calendar_period#
- property period_fiscal_id#
- property period_fiscal_period#
- property period_fiscal_year#
- property period_id#
- property period_year#
- property report_accession#
- property report_creation_software#
- property report_document_index#
- property report_document_type#
- property report_entry_url#
- property report_id#
- property report_restated#
- property report_restated_index#
- property report_sec_url#
- property report_sic_code#
- property report_source_id#
- property report_source_name#
- property unit#