Python SDK for Intacct
Project description
pyintacct
A simple Python SDK for Sage Intacct.
Requirements
- Python >= 3.6
- pydantic
- requests
- jxmlease
Links
Installation
pip install pyintacct
Example usage
from pyintacct import IntacctAPI
config = {'SENDER_ID': 'senderid',
'SENDER_PW': 'senderpassword',
'COMPANY_ID': 'mycompany',
'USER_ID': 'username',
'USER_PW': 'password'}
client = IntacctAPI(config)
customer = {'customer': {'CUSTOMERID': 'C-0001', 'NAME': 'Acme, Inc.'}}
client.create(customer)
r = client.read_by_query('CUSTOMER', 'CUSTOMERID = \'C-0001\'', fields='NAME', pagesize=1)
You can also use pydantic models:
from pydantic import BaseModel
# API 3.0
class Location(BaseModel):
LOCATIONID: str
NAME: str
location = Location(LOCATIONID='T123', NAME='Test Location', PARENTID='100')
client.create(location)
# API 2.1
from pyintacct.models.base import API21Object
class Contact(API21Object):
contactname: str = ...
printas: str = None # Need to assign a default to preserve ordering
# Override create or delete method to fit your object.
@classmethod
def delete(cls):
return 'delete_contact', 'contactname'
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
pyintacct-0.0.8.tar.gz
(6.6 kB
view hashes)
Built Distribution
pyintacct-0.0.8-py3-none-any.whl
(10.1 kB
view hashes)
Close
Hashes for pyintacct-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a327ecfc950cf10dc8137750450c5157ed782984be115ff7a9ff4696f86e3b2 |
|
MD5 | 5852e85857aba16948be7f8dd0f0120c |
|
BLAKE2b-256 | eb23d6aebb39c21b1e61fd3500d843565918d1a28597d2e33ed8701db06d4e09 |