Skip to main content

QuickBooks GUI API

QuickBooks GUI API is a Python toolkit for automating common tasks in QuickBooks Desktop. It wraps the pywinauto library to control the QuickBooks user interface and exposes both a command line interface and Python classes for automation scripts. The project can launch and log in to QuickBooks, manage encrypted credentials, and save invoices or reports to disk. It is designed for Windows environments where QuickBooks Desktop is installed.

Features

  • Startup / Shutdown – programmatically start QuickBooks, open a company file and log in, then gracefully terminate all QuickBooks processes when done.
  • Invoice Automation – open invoices by number and export them as PDF files.
  • Report Automation – open memorized reports and export them to CSV files.
  • Encrypted Credentials – helper commands to store and verify login details encrypted in the project configuration.

Installation

Install from PyPI:

pip install qb-gui-api

Ensure Tesseract OCR and QuickBooks Desktop are installed on the machine. If working from source:

pip install -e .

Command Line Interface

The package installs a single entry point qb-cli with two groups of commands: gui for controlling QuickBooks and setup for credential management.

Usage: qb-cli [GROUP] [COMMAND] [OPTIONS]

GUI Commands

  • qb-cli gui startup [--config-dir PATH] [--config-file NAME] [--no-kill-avatax]

    • Launch QuickBooks, open the configured company file and log in.
    • --config-dir Location of the configuration directory (default configs)
    • --config-file TOML file name to load (default config.toml)
    • --no-kill-avatax Do not terminate Avalara processes after login.
  • qb-cli gui shutdown

    • Terminate all QuickBooks related processes.

Setup Commands

  • qb-cli setup set-credentials --username USER --password PASS [--local-key-name NAME | --local-key-value VALUE] [--config-path PATH]

    • Encrypt the provided username and password and store them in the configuration file.
  • qb-cli setup prompt-credentials [--local-key-name NAME | --local-key-value VALUE] [--config-path PATH]

    • Interactively prompt for the username and password before storing them.
  • qb-cli setup verify-credentials [--local-key-name NAME | --local-key-value VALUE] [--config-path PATH]

    • Validate that the encryption key is correct for the stored credentials.

Example Usage

Below are minimal Python examples for exporting invoices and reports. They mirror the scripts found in samples/.

Saving Invoices

from pathlib import Path
from quickbooks_gui_api import QuickBookGUIAPI
from quickbooks_gui_api.apis import Invoices
from quickbooks_gui_api.models import Invoice

api = QuickBookGUIAPI()
app, window = api.startup()

invoice_list = [
    Invoice("1254", None, Path(r"C:\\Path\\To\\Output")),
    Invoice("2016", None, Path(r"C:\\Path\\To\\Output")),
]

invoice_api = Invoices(app, window)
invoice_api.save(invoice_list)

api.shutdown()

Saving Reports

from pathlib import Path
from quickbooks_gui_api import QuickBookGUIAPI
from quickbooks_gui_api.apis import Reports
from quickbooks_gui_api.models import Report

api = QuickBookGUIAPI()
app, window = api.startup()

report_list = [
    Report("Data Export - All Invoices - V 3", None, Path(r"C:\\Path\\To\\Output")),
    Report("A/P Aging Detail", None, Path(r"C:\\Path\\To\\Output")),
]

report_api = Reports(app, window)
report_api.save(report_list)

api.shutdown()

These snippets start QuickBooks, create objects for each invoice or report, and instruct the appropriate API to save them, then terminates all QuickBooks processes. See the samples/ directory for more complete examples.

Configuration

Configuration values are stored in configs/config.toml. Defaults live in configs/defaults/defaults_qb-gui-api.toml. You can override any setting by editing the config file before running the CLI or automation scripts.

License

This project is licensed under the Apache 2.0 License. See LICENSE for details.

Trademark Notice

"QuickBooks" is a registered trademark of Intuit Inc. This project is not affiliated with Intuit and the author makes no claim of ownership or control over the QuickBooks trademark.

Metadata

Release files for qb-gui-api 1.3.2

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

Source distribution (sdist)

Source distribution for qb-gui-api 1.3.2
File Size Uploaded
qb_gui_api-1.3.2.tar.gz 32.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qb-gui-api 1.3.2
File Interpreter ABI Platform
qb_gui_api-1.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 76.3 kB

Release files / qb_gui_api-1.3.2.tar.gz

Download URL qb_gui_api-1.3.2.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
67e1f4cb3c1ccd8302061448c15f7894d0955d9f8ed8eee43d96b308795bd85d
BLAKE2b-256 checksum
How to use checksums
8210ccc798f3c0b56f08996a38c45eb5f1e66881e47ada4341f7b5e9bf43c559
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / qb_gui_api-1.3.2-py3-none-any.whl

Download URL qb_gui_api-1.3.2-py3-none-any.whl
Size 43.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ef84a612a2eb4a91283e0a5a54d257bce0b39e144b41d21e549a9c6294554c4
BLAKE2b-256 checksum
How to use checksums
7db32fd3569cc2a6fe911d7a248c6300bdee1219d5f600df8c792ec2d9933d8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.3.2 This release

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.0

2 release files

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