qb-gui-api


Nameqb-gui-api JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryA Python toolkit for automating QuickBooks Desktop via the GUI
upload_time2025-07-14 18:35:07
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords quickbooks quickbooks desktop quickbooks enterprise invoice reports
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # QuickBooks GUI API

QuickBooks GUI API is a Python toolkit for automating common tasks in **QuickBooks Desktop**. It wraps the [pywinauto](https://pywinauto.readthedocs.io/) 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:
```bash
pip install qb-gui-api
```

Ensure [Tesseract OCR](https://github.com/tesseract-ocr/tesseract) and QuickBooks Desktop are installed on the machine.
If working from source:
```bash
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

```python
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

```python
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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "qb-gui-api",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "quickbooks, quickbooks desktop, quickbooks enterprise, invoice, reports",
    "author": null,
    "author_email": "Derek Banker <dbb2002@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/a3/4b/d99d607d490eef64810b014c1cfd0f6b0a96b47c1ef7b91c420bb7b3a16e/qb_gui_api-1.0.0.tar.gz",
    "platform": null,
    "description": "# QuickBooks GUI API\n\nQuickBooks GUI API is a Python toolkit for automating common tasks in **QuickBooks Desktop**. It wraps the [pywinauto](https://pywinauto.readthedocs.io/) 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.**\n\n## Features\n\n- **Startup / Shutdown** \u2013 programmatically start QuickBooks, open a company file and log in, then gracefully terminate all QuickBooks processes when done.\n- **Invoice Automation** \u2013 open invoices by number and export them as PDF files.\n- **Report Automation** \u2013 open memorized reports and export them to CSV files.\n- **Encrypted Credentials** \u2013 helper commands to store and verify login details encrypted in the project configuration.\n\n## Installation\nInstall from PyPI:\n```bash\npip install qb-gui-api\n```\n\nEnsure [Tesseract OCR](https://github.com/tesseract-ocr/tesseract) and QuickBooks Desktop are installed on the machine.\nIf working from source:\n```bash\npip install -e .\n```\n\n## Command Line Interface\n\nThe package installs a single entry point `qb-cli` with two groups of commands: `gui` for controlling QuickBooks and `setup` for credential management.\n\n```\nUsage: qb-cli [GROUP] [COMMAND] [OPTIONS]\n```\n\n### GUI Commands\n\n- `qb-cli gui startup [--config-dir PATH] [--config-file NAME] [--no-kill-avatax]`\n  - Launch QuickBooks, open the configured company file and log in.\n  - `--config-dir`  Location of the configuration directory (default `configs`)\n  - `--config-file` TOML file name to load (default `config.toml`)\n  - `--no-kill-avatax`  Do not terminate Avalara processes after login.\n\n- `qb-cli gui shutdown`\n  - Terminate all QuickBooks related processes.\n\n### Setup Commands\n\n- `qb-cli setup set-credentials --username USER --password PASS [--local-key-name NAME | --local-key-value VALUE] [--config-path PATH]`\n  - Encrypt the provided username and password and store them in the configuration file.\n\n- `qb-cli setup prompt-credentials [--local-key-name NAME | --local-key-value VALUE] [--config-path PATH]`\n  - Interactively prompt for the username and password before storing them.\n\n- `qb-cli setup verify-credentials [--local-key-name NAME | --local-key-value VALUE] [--config-path PATH]`\n  - Validate that the encryption key is correct for the stored credentials.\n\n## Example Usage\n\nBelow are minimal Python examples for exporting invoices and reports. They mirror the scripts found in `samples/`.\n\n### Saving Invoices\n\n```python\nfrom pathlib import Path\nfrom quickbooks_gui_api import QuickBookGUIAPI\nfrom quickbooks_gui_api.apis import Invoices\nfrom quickbooks_gui_api.models import Invoice\n\napi = QuickBookGUIAPI()\napp, window = api.startup()\n\ninvoice_list = [\n    Invoice(\"1254\", None, Path(r\"C:\\\\Path\\\\To\\\\Output\")),\n    Invoice(\"2016\", None, Path(r\"C:\\\\Path\\\\To\\\\Output\")),\n]\n\ninvoice_api = Invoices(app, window)\ninvoice_api.save(invoice_list)\n\napi.shutdown()\n```\n\n### Saving Reports\n\n```python\nfrom pathlib import Path\nfrom quickbooks_gui_api import QuickBookGUIAPI\nfrom quickbooks_gui_api.apis import Reports\nfrom quickbooks_gui_api.models import Report\n\napi = QuickBookGUIAPI()\napp, window = api.startup()\n\nreport_list = [\n    Report(\"Data Export - All Invoices - V 3\", None, Path(r\"C:\\\\Path\\\\To\\\\Output\")),\n    Report(\"A/P Aging Detail\", None, Path(r\"C:\\\\Path\\\\To\\\\Output\")),\n]\n\nreport_api = Reports(app, window)\nreport_api.save(report_list)\n\napi.shutdown()\n```\n\nThese 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.\n\n## Configuration\nConfiguration values are stored in `configs/config.toml`. Defaults live in `configs/defaults/defaults_qb-gui-api.toml`.\nYou can override any setting by editing the config file before running the CLI or automation scripts.\n\n## License\n\nThis project is licensed under the Apache 2.0 License. See `LICENSE` for details.\n\n## Trademark Notice\n\n\"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.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python toolkit for automating QuickBooks Desktop via the GUI",
    "version": "1.0.0",
    "project_urls": null,
    "split_keywords": [
        "quickbooks",
        " quickbooks desktop",
        " quickbooks enterprise",
        " invoice",
        " reports"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f30fa4a8052188a3fa805ece0fa51a900084d87bc525b36b7c7172141784a085",
                "md5": "3085196d90023473543c68462d3487c6",
                "sha256": "eaa8a44fd0533ebfd17352102b9b4e276af59defc70d4166117e506078c8a7d7"
            },
            "downloads": -1,
            "filename": "qb_gui_api-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3085196d90023473543c68462d3487c6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 42695,
            "upload_time": "2025-07-14T18:35:06",
            "upload_time_iso_8601": "2025-07-14T18:35:06.043211Z",
            "url": "https://files.pythonhosted.org/packages/f3/0f/a4a8052188a3fa805ece0fa51a900084d87bc525b36b7c7172141784a085/qb_gui_api-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a34bd99d607d490eef64810b014c1cfd0f6b0a96b47c1ef7b91c420bb7b3a16e",
                "md5": "888be95f9b8276fa8275a21561a80ae9",
                "sha256": "38c54f25011b8978e9120fbbdb6bfc698072d86a90b4ee2c85b0b0e25a504cd9"
            },
            "downloads": -1,
            "filename": "qb_gui_api-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "888be95f9b8276fa8275a21561a80ae9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 32517,
            "upload_time": "2025-07-14T18:35:07",
            "upload_time_iso_8601": "2025-07-14T18:35:07.187370Z",
            "url": "https://files.pythonhosted.org/packages/a3/4b/d99d607d490eef64810b014c1cfd0f6b0a96b47c1ef7b91c420bb7b3a16e/qb_gui_api-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-14 18:35:07",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "qb-gui-api"
}
        
Elapsed time: 0.71122s