Metadata-Version: 2.4
Name: qbw
Version: 202611.24.0
Summary: Typed Python reader for QuickBooks Desktop (.qbw) company files, with Apache Arrow export
Keywords: quickbooks,qbw,accounting,finance,arrow,parser
Author: 2xf.org
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Rust
Classifier: Topic :: Office/Business :: Financial :: Accounting
Classifier: Typing :: Typed
Project-URL: Homepage, https://github.com/2xf-org/qbw
Project-URL: Repository, https://github.com/2xf-org/qbw
Project-URL: Issues, https://github.com/2xf-org/qbw/issues
Requires-Python: >=3.11
Requires-Dist: pyarrow>=16
Requires-Dist: pydantic<3,>=2.7
Description-Content-Type: text/markdown

# QuickBooks® Desktop

Read QuickBooks Desktop (`.qbw`) company files in Python, without QuickBooks or a database server.

[Python API](https://github.com/2xf-org/qbw/blob/main/docs/python/README.md) · [Rust API](https://github.com/2xf-org/qbw/blob/main/docs/rust/README.md) · [Examples](https://github.com/2xf-org/qbw/tree/main/python/examples)

Not affiliated with or endorsed by Intuit. QuickBooks is a trademark of Intuit Inc.

## Installing

```bash
pip install qbw
```

Requires Python 3.11 or newer.

## Using

```python
from datetime import date
import qbw

with qbw.Company.open("company.qbw") as company:
    print(company.info().name)

    for account in company.accounts(active_only=True):
        print(account.full_name, account.account_type)

    sheet = company.balance_sheet(date(2024, 6, 30))
    print("Assets:", sheet.assets.total.amount)
    print("Net income:", sheet.equity.net_income.amount)
```

## Arrow, Polars, and DuckDB

Export accounts, names, items, transactions, open items, stock, and general ledger postings to Apache Arrow:

```python
import duckdb
import polars as pl
import qbw

with qbw.Company.open("company.qbw") as company:
    accounts = pl.from_arrow(company.accounts_arrow())

    ledger = company.ledger_arrow(batch_size=8192)
    totals = duckdb.sql(
        """
        SELECT account_name, SUM(home_amount) AS balance
        FROM ledger
        GROUP BY account_name
        ORDER BY balance DESC
        """
    ).fetchall()
```
