NetSuite Connector
Project description
NetSuite-Connector
Supports
Installation
$ pip install NetSuite-Connector
Get Started
The following examples shows how to use this module.
RESTlet GET
from NetSuite_Connector.NetSuite import NetSuite
nt = NetSuite(
account_id=123456,
consumer_keys=dict(consumer_key="2345678", consumer_secret="3456yhg"),
token_keys=dict(token_key="wfdbfdsdfg", token_secret="efguhfjoidejhfije"),
)
x = nt.get(
url="https://xxxx.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=xxxx&deploy=xxxx",
headers={"Content-Type": "application/json"},
params={"foo":"bar"}
)
print(x)
# NetsuiteObject(url='https://xxxx.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=xxxx&deploy=xxxx', request_headers={'Content-Type': 'application/json'}, response='{"foo":"bar"}', code=200)
RESTlet PUT - POST - DELETE
from NetSuite_Connector.NetSuite import NetSuite
nt = NetSuite(
account_id=123456,
consumer_keys=dict(consumer_key="2345678", consumer_secret="3456yhg"),
token_keys=dict(token_key="wfdbfdsdfg", token_secret="efguhfjoidejhfije"),
)
body={"foo":"bar"}
x = nt.post(
url="https://xxxx.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=xxxx&deploy=xxxx",
headers={"Content-Type": "application/json"},
params={},
body=body
)
print(x)
# NetsuiteObject(url='https://xxxx.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=xxxx&deploy=xxxx', request_headers={'Content-Type': 'application/json'}, request_data={"foo":"bar"}, response='{"foo":"bar"}', code=200)
SuiteQL Queries
To execute SuiteQL queries through REST web services, send a POST request to the suiteql resource, and specify the query in the request body after the query parameter q. The following example shows a SuiteQL query executed through REST web services.
SuiteQL Query
from NetSuite_Connector.ODBC import ODBC
nt = ODBC(
account_id=123456,
consumer_keys=dict(consumer_key="2345678", consumer_secret="3456yhg"),
token_keys=dict(token_key="wfdbfdsdfg", token_secret="efguhfjoidejhfije"),
)
q = nt.query("SELECT top 10 * FROM transaction")
print(q)
# NetsuiteObject(url='https://xxxx.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=xxxx&deploy=xxxx', request_headers={'Content-Type': 'application/json'}, request_data={"foo":"bar"}, response='{"foo":"bar"}', code=200)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netsuite_connector-0.3.2.tar.gz.
File metadata
- Download URL: netsuite_connector-0.3.2.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a76a8cfce868c29d63e88d08a7c507f47a9ec1e0a715e8b698c1ae10f3a9118
|
|
| MD5 |
3bc8a1a90e330bf3c4668bb6df44ca84
|
|
| BLAKE2b-256 |
b34d24c335e517a1d4a44cfa072443a05df46d66a4db61fec5a2dc4786d71590
|
File details
Details for the file netsuite_connector-0.3.2-py3-none-any.whl.
File metadata
- Download URL: netsuite_connector-0.3.2-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6abe551c138d787c8efb9c49ec1b44d17046efc2cf6e025d2ab2769ea872cc0e
|
|
| MD5 |
0c261f1d3f1c3293d6bbfecb099d599f
|
|
| BLAKE2b-256 |
441998b4b61642e38895820f96afdf369ae286a9f7cf02c636f035ed2a21edcc
|