View on GitHub

xbrl

A Lightweight XBRL Taxonomy and Instance Document Model

XBRL Model

XBRL Model is a Python package for dealing with XBRL data. XBRL stands for eXtensible Business Reporting Language. XBRL is the open international standard for digital business reporting, managed by a global not for profit consortium, XBRL International.

Supported XBRL Specifications

The XBRL Model package includes parsers and data objects to represent both instance documents (containing real data) and XBRL taxonomies (containing metadata). It supports various XBRL specifications - in particular:

Use Cases

XBRL Model can be used to process large amounts of XBRL filings from open data providers such as SEC/EDGAR, GOV.UK and many others. It is able to automatically download and unpack Web based data sources and contains a caching mechanism to improve speed when processing Web based taxonomies. It contains an in-memory mechanism to maintain multiple taxonomies, and taxonomy versions in the same time and thus can become a fundament for various Web based applications for XBRL reporting and data analysis.

Install

Download package

git clone https://github.com/fractalexperience/xbrl.git

See examples for basic use cases and source code samples. Note that examples must be executed from the corresponding example folder.

Third party components

XBRL Model makes use of “lxml” XML parser - https://lxml.de/. This package must be installed prior to running XBRL Model code. Please see https://lxml.de/installation.html for more details.

Examples

The package includes a number of examples to illustrate various use cases. Click on links below to see the list of examples.

Taxonomy Packages - Most of the taxonomies are nowadays distributed in form of taxonomy packages.

Taxonomy Discovery - Loading of a XBRL taxonomy can be a challenging operations, because some taxonomies contain 10,000+ files. {XM} supports various scenarios to load taxonomies as well as an optimized model for in-memory taxonomy storage.

Taxonomy Browsing - XBRL Taxonomies contain large amounts of different objects. {XM} can be used to effectively display information about them as well as the relationships amongst each other.

Table Rendering - {XM} can calculate table layout and render document templates as HTML files.

Instance Document Analysis - {XM} includes basic tools for processing of XBRL filings.

iXBRL Processing - {XM} is able to extract native XBRL from Inline XBRL filings. To do so, it supports related transformation registries and structures.

XBRL Explained

Check links below for very brief explanation about what XBRL is and how data is structured.