Spire¶
High-level interface to interact with the Spire API.
This class wraps the lower-level API clients (Orders, Invoices, Customers, Inventory) into a unified interface,
initializing them using shared authentication via SpireClient.
Attributes:
| Name | Type | Description |
|---|---|---|
client |
SpireClient
|
Authenticated Spire API client. |
orders |
OrdersClient
|
Client for accessing sales orders. |
invoices |
InvoiceClient
|
Client for accessing invoices. |
customers |
CustomerClient
|
Client for accessing customer records. |
inventory |
InventoryClient
|
Client for accessing inventory items. |
purchasing |
PurchasingClient
|
Client for accessing purchasing records. |
purchasingHistory |
PurchasingHistoryClient
|
Client for accessing purchasing history records. |
Source code in src/spyre/spire.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
__init__(host, company, username, password)
¶
Creates a Spire session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
host
|
str
|
Spire Server host (e.g., black-disk-5630.spirelan.com:10880). |
required |
company
|
str
|
Spire company. |
required |
username
|
str
|
Spire user username. |
required |
password
|
str
|
Spire user password. |
required |
Source code in src/spyre/spire.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |