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)
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.4.tar.gz
(3.1 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.4.tar.gz.
File metadata
- Download URL: secxbrl-0.0.4.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7d00c0f713a437b2913eda0bf3a3906ca1b3bbc1e60eafbcbbed3cab2d68240
|
|
| MD5 |
c9dbd8e1db9e8a8fd77440d6812000f7
|
|
| BLAKE2b-256 |
36f336a98ddfce40a14c3477e001c048da8e17608f7b848f0931c834cf5f56b7
|
File details
Details for the file secxbrl-0.0.4-py3-none-any.whl.
File metadata
- Download URL: secxbrl-0.0.4-py3-none-any.whl
- Upload date:
- Size: 3.6 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 |
91723c1a05b698a7585a57eff38be4d64b2aedba8852a8062c8dfb8ce7deffd5
|
|
| MD5 |
998504a0233b01e6aef8fbe384c5e338
|
|
| BLAKE2b-256 |
2f86b768255f1105249222161f9b5fd9c060b2f3109b9472f7f862a7407afc35
|