Skip to main content

ixbrl-parse

Test status PyPI version PyPI - Python Version PyPI - License Documentation Status

A lightweight python module for getting useful data out of iXBRL™ and XBRL™ files. The library is at an early stage - feedback and improvements are very welcome.

Full documentation is available at ixbrl-parse.readthedocs.io

For more about the iXBRL™ and XBRL™ standards, see the specification site and XBRL International. This tool is not affiliated with XBRL International.

Changelog

Quickstart

If you use uv you can run the tool against an iXBRL™ file without installing it by running:

uvx ixbrlparse example_file.html

This will output a CSV file containing items from the account.

Requirements

The module requires BeautifulSoup and lxml to parse the documents.

If you're using Python 3.13 you may need to ensure that the libxml2-dev and libxslt-dev packages have been installed.

word2number is used to process the numeric items with the numsenwords format.

How to install

You can install from pypi using pip:

pip install ixbrlparse

How to use

You can run the module directly to extract data from an iXBRL™ file.

ixbrlparse example_file.html
# or
python -m ixbrlparse example_file.html

While primarily designed for iXBRL™ files, the parser should also work for XBRL™ files.

The various options for using this can be found through:

python -m ixbrlparse -h
# optional arguments:
#   -h, --help            show this help message and exit
#   --outfile OUTFILE     Where to output the file
#   --format {csv,json,jsonlines,jsonl}
#                         format of the output
#   --fields {numeric,nonnumeric,all}
#                         Which fields to output

You can also use as a python module (see the documentation for more details)

Development

The module is setup for development using hatch. It should be possible to run tests and linting without needed hatch, however.

Run tests

Tests can be run with pytest:

hatch run test

Without hatch, you'll need to run:

pip install -e .[test]
python -m pytest tests

Test coverage

Run tests then report on coverage

hatch run cov

Without hatch, you'll need to run:

pip install -e .[test]
coverage run -m pytest tests
coverage report

Run tests then run a server showing where coverage is missing

hatch run cov-html

Without hatch, you'll need to run:

pip install -e .[test]
coverage run -m pytest tests
coverage report
coverage html
python -m http.server -d htmlcov

Run typing checks

hatch run lint:typing

Without hatch, you'll need to run:

pip install -e .[lint]
mypy --install-types --non-interactive src/ixbrlparse tests

Linting

Ruff should be run before committing any changes.

To check for any changes needed:

hatch run lint:style

Without hatch, you'll need to run:

pip install -e .[lint]
ruff check .
ruff format --check --diff .

To run any autoformatting possible:

hatch run lint:fmt

Without hatch, you'll need to run:

pip install -e .[lint]
ruff format .
ruff check --fix .

Run all checks at once

hatch run lint:all

Without hatch, you'll need to run:

pip install -e .[lint]
ruff check .
ruff format --check --diff .
mypy --install-types --non-interactive src/ixbrlparse tests

Publish to pypi

hatch build
hatch publish
git tag v<VERSION_NUMBER>
git push origin v<VERSION_NUMBER>

Acknowledgements

Developed by David Kane of Kane Data Ltd

Originally developed for a project with Power to Change looking at how to extract data from financial documents of community businesses.

Thanks to the following users for their contributions:

XBRL™ and iXBRL™ are trademarks of XBRL International, Inc. All rights reserved.

The XBRL™ standards are open and freely licensed by way of the XBRL International License Agreement. Our use of these trademarks is permitted by XBRL International in accordance with the XBRL International Trademark Policy.

AI Policy and provenance

This project does not contain any code independently generated by LLM-based agents. Limited in-editor autocomplete was used when authoring the code. No LLM generated text is used in documentation.

Metadata

Release files for ixbrlparse 0.12.0

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

Source distribution (sdist)

Source distribution for ixbrlparse 0.12.0
File Size Uploaded Provenance Actions
ixbrlparse-0.12.0.tar.gz 14.4 kB With provenance Details for ixbrlparse-0.12.0.tar.gz

Built distribution (wheel)

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

Total release size: 31.7 kB

Release files / ixbrlparse-0.12.0.tar.gz

Download URL ixbrlparse-0.12.0.tar.gz
Size 14.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9f762d6e22ba7a58dcbaaaf6e6d8f50c98b45452c3a8df5ae9f5937076e78cd8
BLAKE2b-256 checksum
How to use checksums
e567dc76b636ee5ac0b63ef6b953a2692820b77dd888b1631d621e8857af5969
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / ixbrlparse-0.12.0-py3-none-any.whl

Download URL ixbrlparse-0.12.0-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a989498148d55c3d350c6f8317d3ada280aade98288eec75a2bb42c5f847cf5
BLAKE2b-256 checksum
How to use checksums
0dd256e1ec480a82e14db6d5d935b60f84c3a45b98a2cd46c3d4f9b5c72cb9de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Security for ixbrlparse 0.12.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ixbrlparse-0.12.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.12.0 This release

2 release files Full provenance

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