Skip to main content

openqbw (Python)

Python bindings for OpenQBW, a read-only parser for QuickBooks .qbw files. Targets data-liberation and forensic workflows.

Prototype quality. See the parent repository's README.md and SPECIFICATION.md for what is and is not yet supported.

Install

pip install openqbw

Python 3.10 or later. Wheels (abi3) are published for Linux, macOS and Windows.

To build from a clone instead:

pip install maturin
cd OpenQBW/crates/openqbw-py
maturin develop --release

This builds the extension and installs it into the active Python environment.

Quick start

import openqbw

# Strict is the default and raises at the first record it cannot decode.
# Real files often need lenient mode, which skips and lists those records.
r = openqbw.open("/path/to/file.qbw", lenient=True)
print(r.page_count, "pages,", r.file_size, "bytes")

for t in r.tables()[:5]:
    print(t.table_id, t.name)

lines = r.line_items()
for li in lines[:3]:
    # value is a decimal.Decimal, or None when the field was not decoded; it
    # is never 0 for "unknown". It is not established as the line amount, and
    # source_table is a position-based, unverified attribution.
    print(li.qb_id_parent, li.value, li.value_undecoded, li.source_table, li.flags)
for w in lines.warnings:
    print("warning:", w.kind, w.message)

for h in r.transactions()[:3]:
    print(h.qb_id, h.txn_type)

# Each skipped record is listed.
for rej in lines.rejected:
    print(rej.kind, rej.page_number, rej.page_offset, rej.message)

API

openqbw.open(path, *, lenient=False) -> Reader

Reads are strict: a record or page that cannot be decoded with confidence raises (the message says to open the file with lenient=True). With lenient=True such records are skipped, listed in each result's rejected, and an openqbw.OpenQBWWarning is issued.

Reader attributes: path, lenient, page_count, file_size, created_unix_seconds (the stored count taken as UTC), attribution_gap.

LineItem.txn_date_days_since_unix is a converted date, best effort: the offset is fitted to one sample and not checked against a date known from another source. The raw value is txn_date_raw. LineItem.value_undecoded is None or one of zero_length, digit_over_99, exponent_out_of_range or sector_boundary.

Reader methods, each returning a ScanReport:

  • tables() - Table rows of the SYSTABLE catalog
  • indexes() - Index rows of the SYSINDEX catalog
  • line_items() - LineItem records, attributed to source tables by page position (unverified)
  • transactions() - Transaction headers

A ScanReport is a sequence of its items and also has rejected (a list of Rejected: kind, page_number, page_offset, message) and warnings (a list of ReadWarning: kind, message). Records have attributes, a flags list naming the reasons a record deserves less trust, and to_dict().

Exceptions: OpenQBWError (a ValueError) is the base class. OpenQBWIOError (also an OSError) means the file could not be read; FormatError means it is not a supported company file or a page is damaged; RecordError (a FormatError) means a record could not be decoded; ContentError (a FormatError) means the content is not readable. Every exception has kind, page_number and page_offset.

Type stubs (.pyi) and py.typed ship with the package.

Tests

pip install pytest
pytest crates/openqbw-py/tests

Metadata

Release files for openqbw 0.2.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 openqbw 0.2.0
File Size Uploaded Provenance Actions
openqbw-0.2.0.tar.gz 127.0 kB With provenance Details for openqbw-0.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for openqbw 0.2.0
File Interpreter ABI Platform Actions
openqbw-0.2.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for openqbw-0.2.0-cp310-abi3-win_amd64.whl
openqbw-0.2.0-cp310-abi3-manylinux_2_34_x86_64.whl CPython 3.10 abi3 Linux glibc 2.34+ x86-64 Details for openqbw-0.2.0-cp310-abi3-manylinux_2_34_x86_64.whl
openqbw-0.2.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for openqbw-0.2.0-cp310-abi3-macosx_11_0_arm64.whl

Total release size: 1.2 MB

Release files / openqbw-0.2.0.tar.gz

Download URL openqbw-0.2.0.tar.gz
Size 127.0 kB
Tags Source
SHA-256 checksum
How to use checksums
78edf3100c41cf3ab7261d9d8ef0b7b2723cb8ab2c3d323b7ed5f723852c403c
BLAKE2b-256 checksum
How to use checksums
eeaa2a43b6548fdbee4f9678448aee3738ce8ef0a421bb091f5abfc89965e7cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 2, 2026.

Transparency log

Release files / openqbw-0.2.0-cp310-abi3-win_amd64.whl

Download URL openqbw-0.2.0-cp310-abi3-win_amd64.whl
Size 306.4 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1ba7afca53f488a8346b222cafe32d1e5d546fda86476f7a89c6cdfa250f811d
BLAKE2b-256 checksum
How to use checksums
c54197f1c8b716d1a997edd00575d8ffad489c5cb4975c760068d700d80a0f47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 2, 2026.

Transparency log

Release files / openqbw-0.2.0-cp310-abi3-manylinux_2_34_x86_64.whl

Download URL openqbw-0.2.0-cp310-abi3-manylinux_2_34_x86_64.whl
Size 401.3 kB
Tags CPython 3.10 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
3060549698b8b609d4fcb1706e8d6e97a389899351427c5d9ff195b13cf122ce
BLAKE2b-256 checksum
How to use checksums
6763458604fbe636362fc01c71c09e0a5d11e2fe6ff98496b5b6f2ce275f3947
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 2, 2026.

Transparency log

Release files / openqbw-0.2.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL openqbw-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Size 359.5 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d04be26b3acf505d73351a07a224508f4165b1084e8bd86d36fc2ff79fc8f82c
BLAKE2b-256 checksum
How to use checksums
e49a9332f44b91eee50e39ada2174b8a0a2893b5471eaf3f5a6923c0357ad60a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 2, 2026.

Transparency log

Security for openqbw 0.2.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 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for openqbw-0.2.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 Nov 2, 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.

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