XBRR: eXtensible Business Report Reader
Features:
- API: Download the documents from official publication site.
- Reader: Extract contents from XBRL.
Supported documents:
- Japan
- API: EDINET
- Reader: Mainly supports annual reports disclosed on EDINET.
- America
- API: Comming soon
- Reader: Comming soon
We are welcome the contribution to support other countries API & Documents!
Install
pip install xbrr
How to use
(Examples are Japanese EDINET API and annual report).
1. API
Download the documents from EDINET.
1.1 Get document list of specific day
import xbrr
documents = xbrr.edinet.api.documents.get("2019-01-31")
print(f"Number of documents is {len(documents.list)}")
print(f"Title of first document is {documents.list[0].title}")
1.2 Get document by document id
from pathlib import Path
import xbrr
xbrl_path = xbrr.edinet.api.document.get_xbrl("S100FGR9", save_dir=Path.cwd())
pdf_path = xbrr.edinet.api.document.get_pdf("S100FGR9", save_dir=Path.cwd())
Each XBRL includes taxonomy information. If you want to deal with these files, execute the following.
xbrl_dir = xbrr.edinet.api.document.get_xbrl("S100FGR9", save_dir=Path.cwd(), expand_level="dir")
2. Reader
Extract contents from XBRL.
xbrl = xbrr.edinet.reader.read("path/to/xbrl/file")
content = xbrl.extract(xbrr.edinet.aspects.Business).policy_environment_issue_etc.value
Extract financial statements.
xbrl_dir = xbrr.edinet.reader.read("path/to/xbrl/dir")
xbrl_dir.extract(xbrr.edinet.aspects.Finance).bs.to_csv("bs.csv", index=False)
Please refer to the supported aspects from the following links.
Metadata
Release files for xbrr 0.2.7.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xbrr-0.2.7.5.tar.gz | 1.7 MB | Without provenance | Details for xbrr-0.2.7.5.tar.gz |
Release files / xbrr-0.2.7.5.tar.gz
| Download URL | xbrr-0.2.7.5.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83058c99ebd3d2623c36428f8031d5683242ff89bac1fb23971b970a0f04e192
|
|
BLAKE2b-256 checksum How to use checksums |
330855b0112860dc0b06ec764439afe81fa044954681a298e9678dcdf5e92130
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.1
|
Security for xbrr 0.2.7.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.