Skip to main content

'Middleware for connecting to the Quickbooks Web Connector.'

Project description

qwc-middleware

SOAP service for connecting to QuickBooks webconnector.

Built using the framework built by Bill Barry in: https://github.com/BillBarry/pyqwc

Updated for use with python3, WebConnector version 2.3.0.207, and rapid proto-typing of different QuickBooks objects.

Useage

qwc is a soap server with built in client that uses redis to queue raw QBXML to be processed by the QuickBooks WebConnector. This is an asynchronous process that requires the client to listen for when work has been completed by the QBWC.

[client] >> sends qbxml >> [redis]

[QBWC] >> checks redis for new tickets >> [redis]

[redis] >> sends qbxml via ticket >> [QBWC]

[QBWC] >> process ticket and returns reslt/error >> [redis]

[client] >> query or subscribe to redis for result >> [redis]

Install the package in a fresh environment:

python -m venv .venv 

then in install the package with pip:

python -m pip install qwc

Or get the latest development version from github:

python -m pip install git+https::/github.com/bill-ash/qwc-middleware

If no config.ini file is found in the local directory, the default included with the package will be used:

[qwc]
qbwfilename = ''

username = 'qbwcuser'
# Password entered when install the .qwc file to QuickBooks WebConnector.
password = 'test'
host = 'localhost'
port = 4244

[redis]
host = '127.0.0.1'
port = 6379
password = ''
db = 0

Install the pyqwc.qwc file to the QuickBooks WebConnector by opening the WebConnector, File >> AppManagement >> Update Web Services and choose pyqwc.qwc. The default password is test.

Start the service with:

python -m qwc.scripts.start_server

Then, in a new terminal start a new session adding commands to be executed with the client.

qwcClient = QBWCClient()

reqXML = add_customer('SuperCustomer123')

# Send the request to Redis to be processed by QuickBooks WebConnector 
qwcClient.sendxml(reqXML)

Check the examples directory for additional information.

Once new work has been delivered to the Redis queue, run an update from the QuickBooks WebConnector to execute the pending work to be performed.

Sample .qwc file

Below is a sample .qwc file to be installed to the QuickBooks WebConnector:

<?xml version="1.0"?>
<QBWCXML>
    <AppName>QWCTestService</AppName>
    <AppID></AppID>
    <AppURL>http://localhost:4244/qwc/</AppURL>
    <AppDescription>Python access to Quickbooks</AppDescription>
    <AppSupport>http://localhost:4244/</AppSupport>
    <UserName>qbwcuser</UserName>
    <OwnerID>{6801a7d2-3fb4-4643-8ef0-5e702b99521e}</OwnerID>
    <FileID>}495b6884-e33f-4dba-9ecc-a3bbad96a971}</FileID>
    <QBType>QBFS</QBType>
    <Scheduler>
        <RunEveryNMinutes>60</RunEveryNMinutes>
    </Scheduler>
</QBWCXML>

Save this file with a .qwc extension to successfully install to the WebConnector.

Example

from qwc.client import QBWCClient
from qwc.objects import add_customer
from qwc.service import start_server

# Create the QBXML
customer = add_customer(name='BillAsh123')

# Start a new client 
client = QBWCClient()

# Deliver the QBXML to redis to be processed 
client.sendxml(customer)

# Start the server and then update the installed service from QuickBooks WebConnector
start_server()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qwc-0.0.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

qwc-0.0.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file qwc-0.0.1.tar.gz.

File metadata

  • Download URL: qwc-0.0.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for qwc-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b1464c4b682fa7e1c6495c0ef5579a90bf02bcdc96bcc5a2c03b78f4a5c7476c
MD5 82a4c2086f2b94d9e66c126522d86a7c
BLAKE2b-256 c42e8592e2efcc36b206610378b6845bef1d2c14c4c8565e287412851383d74f

See more details on using hashes here.

File details

Details for the file qwc-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: qwc-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for qwc-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a9449a6a6c8e3bee9d071154368eb88512bae01798d4a08540bb4af45fbda9f8
MD5 34af835c5ff0289dd992fa155ac0c224
BLAKE2b-256 51c1671f9ef2c0242c66dcdbc2f930b7ecc7f9ab21525d08728f8f6c687d733c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page