A package to parse SEC XBRL
Project description
SEC XBRL
A python package to parse sec xbrl. Supports the datamule project.
Intended to be fast & lightweight for SEC inline XBRL.
Other XBRL Packages may be better for your use-case:
Installation
pip install secxbrl
Example
from secxbrl import parse_inline_xbrl
# load data
path = '../samples/000095017022000796/tsla-20211231.htm'
with open(path,'rb') as f:
content = f.read()
# parse data
ix = parse_inline_xbrl(content) # can also use filepath
with open('test.txt','w', encoding='utf-8') as f:
f.writelines([str(item)+'\n\n' for item in ix])
# get all EarningsPerShareBasic
basic = [{'val':item['_val'],'date':item['_context']['context_period_enddate']} for item in ix if item['_attributes']['name']=='us-gaap:EarningsPerShareBasic']
print(basic)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
secxbrl-0.0.5.tar.gz
(3.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file secxbrl-0.0.5.tar.gz.
File metadata
- Download URL: secxbrl-0.0.5.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05506ac31198a02d1101b17b78d4e05cc615a6004615dc6d1a81562e2920941c
|
|
| MD5 |
d160f2005086fc33cba7a7247b9a2aaa
|
|
| BLAKE2b-256 |
fdd950065cf57e943584c76a0f23125f5271e881047bde4e5a6a44c5c4bfcfe6
|
File details
Details for the file secxbrl-0.0.5-py3-none-any.whl.
File metadata
- Download URL: secxbrl-0.0.5-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5bb752a6d14a1a05ce84382a62e79784a8084f6b41750910237cdfb8d3f327c
|
|
| MD5 |
c1b9f61d9e80bdaeb09e45374749e8b2
|
|
| BLAKE2b-256 |
d52f493469f5512558defa399afcfb53504dfe28252f20dadb88d87eea33760c
|