Skip to main content


PyPI PyPI - Status PyPI - Python Version PyPI - Downloads

tidyxbrl: The tidy Python XBRL Interface

What is it?

tidyxbrl is a Python package that parses XBRL data files and returns dynamic structures that succinctly store the underlying data. This package additionally can interface with the XBRL API and SEC EDGAR interfaces, with further expansion to other XBRL data providers planned for the near future. This package aims to the be the simplest and most effective method to parse XBRL data in Python.

The XBRL Standard

eXtensible Business Reporting Language (XBRL) is a standardized financial reporting framework to structure financial reporting in a way that enables automation and machine processing. This package aims to enable its users to realize the full capabilities of the XBRL standard through parsing files and interfacing with the applicable APIs.

Applicable documentation can be found below:

XBRL

EDGAR

Where to get it

The source code is currently hosted on GitHub at: https://github.com/cowboycodeman/tidyxbrl/

The tidyxbrl package is publically available for download at: https://pypi.org/project/tidyxbrl/

# PyPI
pip install tidyxbrl

Examples

xbrl_parse - Parse xbrl files or website urls

tidyxbrl.xbrl_parse("https://www.sec.gov/Archives/edgar/data/320193/000032019321000010/aapl-20201226_htm.xml")

xbrl_query - Query the XBRL API

response = tidyxbrl.xbrl_apikey(username=username, password=password, client_id=client_id, client_secret=client_secret, platform='pc', grant_type='password', refresh_token='')
dataresponse = tidyxbrl.xbrl_query(access_token=response.access_token.values[0], 
               baseapiurl='https://api.xbrl.us/api/v1/report/search?',
               queryparameters = {'report.entity-name': "APPLE INC.",
                                  'fields': "report.id,report.entity-name,report.filing-date,report.base-taxonomy,report.document-type,report.accession,entity.ticker,report.sic-code,entity.cik,report.entry-type,report.period-end,report.sec-url,report.checks-run,report.accepted-timestamp.sort(DESC),report.limit(20),report.offset(0),dts.id,report.entry-url",
                                  'report.document-type': "10-K"
                        })

edgar_query - Query SEC data using the Central Index Key (CIK)

companycik = tidyxbrl.edgar_cik("ZILLOW GROUP, INC")
desiredcorp = str(companycik[companycik.company.str.contains("ZILLOW GROUP, INC.")]['cik_str'].unique()[0])
tidyxbrl.edgar_query(desiredcorp, query_type = 'submissions')
tidyxbrl.edgar_query(desiredcorp, query_type = 'companyconcept', queryextension = '/us-gaap/AccountsPayableCurrent')
tidyxbrl.edgar_query(desiredcorp, query_type = 'companyfacts')

edgar_frames - Aggregates one fact for each reporting entity

tidyxbrl.edgar_frames(urldescriptor = 'us-gaap/NonoperatingIncomeExpense/USD/CY2019Q1I')

Data Visualization

Real Estate Assets

Dependencies

Metadata

Release files for tidyxbrl 1.2.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tidyxbrl 1.2.13
File Size Uploaded Provenance
tidyxbrl-1.2.13.tar.gz 16.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tidyxbrl 1.2.13
File Interpreter ABI Platform
tidyxbrl-1.2.13-py3-none-any.whl Python 3 none any Details

Total release size: 32.5 kB

Release files / tidyxbrl-1.2.13.tar.gz

Download URL tidyxbrl-1.2.13.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c6daf975db082d5a3f4c85bba5db6afcd56007736ad6c59f6369b14c480c3532
BLAKE2b-256 checksum
How to use checksums
94614cb8402a4812c801dba0f811c3292e4db1c3cd45cd226f7b8e5936a81848
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.6

Release files / tidyxbrl-1.2.13-py3-none-any.whl

Download URL tidyxbrl-1.2.13-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf8af304a7320b4ae38efe7f19571a5723d3b3546b9eb3436bf85737022120ef
BLAKE2b-256 checksum
How to use checksums
64b8967a2225b6877070b6ffe40b46c6f21cad767fa4bfc03fd047967437173a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.6

Security for tidyxbrl 1.2.13

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page