Giter VIP home page Giter VIP logo

edinet_xbrl's Introduction

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.

edinet_xbrl's People

Contributors

fx-kirin avatar meihei3 avatar shoe116 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

edinet_xbrl's Issues

keyが途中で切れる

jpcrp030000-asr_E00053-000:ManagementAnalysisOfFinancialPositionOperatingResultsAndCashFlowsTextBlockという元データのkeyに対して、
jpcrp030000-asr_e00053-000:managementanalysisoffinancialpositionoperatingresultsandcashflowstextblocとなり、途中で途切れてしまいます。

Return Nothing

I get nothing when I run the following code.

ticker = "8316"
xbrl_downloader.download_by_ticker(ticker, target_dir)

get_valueオブジェクトがない、とエラーが出る

以下、原因がわからず困っております。
.get_valueを除いて実行するとNoneが格納されます。

【実行】
from edinet_xbrl.edinet_xbrl_parser import EdinetXbrlParser

"""

init parser

parser = EdinetXbrlParser()

parse xbrl file and get data container

xbrl_file_path = ("dataset/6072_jpcrp030000-asr-001_E27059-000_2014-03-31_01_2014-06-27.xbrl")
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()

【エラー】
AttributeError Traceback (most recent call last)
in ()
12 key = "jppfs_cor:Assets"
13 context_ref = "CurrentYearInstant"
---> 14 current_year_assets = edinet_xbrl_object.get_data_by_context_ref(key, context_ref).get_value()

AttributeError: 'NoneType' object has no attribute 'get_value'
"""

it can work for only current 3 years.

It can't be get some xbrl, for example, "jpfr-asr-E00457-000-2009-03-31-01-2009-06-26.xbrl" that is a report of 2897:Nissin (from H20.4.1 to H21.3.31), and/or "jpcrp030000-asr-001_E00457-000_2014-03-31_01_2014-06-26.xbrl" that is a report of 2897:Nissin (from H25.4.1 to H26.3.31).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.