edinet_xbrl ######################################## .. image:: https://badge.fury.io/py/edinet-xbrl.svg :target: https://badge.fury.io/py/edinet-xbrl .. image:: https://travis-ci.org/BuffetCode/edinet_xbrl.svg?branch=master :target: https://travis-ci.org/BuffetCode/edinet_xbrl
edinet_xbrl is a Python parser for Edinet xbrl files.
To install edinet_xbrl, simply:
.. code-block:: bash
$ pip install edinet-xbrl
..
To download xbrl files from EDINET:
.. code-block:: python
from edinet_xbrl.edinet_xbrl_downloader import EdinetXbrlDownloader
xbrl_downloader = EdinetXbrlDownloader()
ticker = "1234" target_dir = "a target directory path" xbrl_downloader.download_by_ticker(ticker, target_dir)
..
To get value from your xbrl files:
.. code-block:: python
from edinet_xbrl.edinet_xbrl_parser import EdinetXbrlParser
parser = EdinetXbrlParser()
xbrl_file_path = "set your xbrl file path" edinet_xbrl_object = parser.parse_file(xbrl_file_path)
key = "jppfs_cor:Assets" context_ref = "CurrentYearInstant" current_year_assets = edinet_xbrl_object.get_data_by_context_ref(key, context_ref).get_value()
..
| We use github issues to manage bugs. | If you found some bugs, please report from here_. | Of course, any pull requests are welcome.
.. _here: https://github.com/BuffetCode/edinet_xbrl/issues/new