Skip to main content

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


Download files

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

Source Distribution

netsuite_connector-0.3.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

NetSuite_Connector-0.3.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file netsuite_connector-0.3.0.tar.gz.

File metadata

  • Download URL: netsuite_connector-0.3.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for netsuite_connector-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c79a5b9dc7f116dbc1933700a74bc53a4954b3b77c5cfb86d05970e77f32abd4
MD5 12e1a8df17bc1437d2b2169f2751c5e1
BLAKE2b-256 9c92438114c30b65eb8b68c3b0617efeeb7f94d94d8ae2af855b20e5ee5cb9a8

See more details on using hashes here.

File details

Details for the file NetSuite_Connector-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for NetSuite_Connector-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd978fc63ed99b08053b30867fcc05a90b79e9b63b0c3060f61b74968f33e09f
MD5 878475c5d7369a490e2d7cdd83185ee5
BLAKE2b-256 87da55984f5bacf054c5b241021ab46195e487925fd91fc28c6004043ae0075c

See more details on using hashes here.

Supported by

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