Netsuite Python Toolkit for SuiteTalk SOAP API.
pip3 install git+git://github.com/fmalina/python-netsuite.git#egg=python-netsuite
Copy ns_config.py.txt
into ns_config.py
and update with your credentials.
from netsuite.client import client
from netsuite.api.customer import get_customer
# print names of first 100 customers
for internal_id in range(100):
customer = get_customer(internal_id)
if customer:
print(customer.firstName, customer.lastName)
- Get Netsuite WSDL export to look at
mkdir archive
python3 -mzeep https://webservices.sandbox.netsuite.com/wsdl/v2016_1_0/netsuite.wsdl > archive/wsdl.txt
# improve formatting
sed -i -e 's/, /, \n /g' archive/wsdl.txt
less archive/wsdl.txt
- Add Netsuite models you need to work with based on WSDL to
netsuite/service.py
. - Add functions to get, create, lookup... these model instances to
netsuite/api/[model].py
. - Add tests to
tests.py
. Run tests using./tests.py