kyama / edinet_xbrl

A Python xbrl file downloader and parser for EDINET

Home Page:https://www.buffett-code.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

edinet_xbrl

image

image

edinet_xbrl is a Python parser for Edinet xbrl files.

Installation

To install edinet_xbrl, simply:

$ pip install edinet-xbrl

How To Use

To download xbrl files from EDINET:

from edinet_xbrl.edinet_xbrl_downloader import EdinetXbrlDownloader

## init downloader
xbrl_downloader = EdinetXbrlDownloader()

## set a ticker you want to download xbrl file
ticker = "1234"
target_dir = "a target directory path"
xbrl_downloader.download_by_ticker(ticker, target_dir)

To get value from your xbrl files:

from edinet_xbrl.edinet_xbrl_parser import EdinetXbrlParser

## init parser
parser = EdinetXbrlParser()

## parse xbrl file and get data container
xbrl_file_path = "set your xbrl file path"
edinet_xbrl_object = parser.parse_file(xbrl_file_path)

## get value from container
key = "jppfs_cor:Assets"
context_ref = "CurrentYearInstant"
current_year_assets = edinet_xbrl_object.get_data_by_context_ref(key, context_ref).get_value()

Development and Bug Reports ===============

We use github issues to manage bugs.
If you found some bugs, please report from here.
Of course, any pull requests are welcome.

About

A Python xbrl file downloader and parser for EDINET

https://www.buffett-code.com/

License:Apache License 2.0


Languages

Language:Jupyter Notebook 85.7%Language:Python 14.3%