Skip to main content

NetSuite Connector

Project description

NetSuite-Connector

Installation

Only Restlet support:

$ 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_id="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={}
)
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_id="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)

ODBC Queries

Connector only supports ODBC Driver queries, JDBC is not supported

Get Started

Before you begin install ODBC Driver.

Note that Support for NetSuite2.com is supported, which means that Only roles that hat not activated 2FA are supported. Also note that role must have permission to SuiteAnalitics.

ODBC Query

from NetSuite_Connector.ODBC import ODBC

nt = ODBC(
    account_id="*****",
    user_email="*****",
    role_id="*****",
    dsn="*****",
    password="*****"
)
q = nt.query("SELECT * FROM OA_tables")
print(q.status)
# 200
print(q.response)
#[{"foo":"bar"}]
print(q.data_received)
# SELECT * FROM OA_tables
print(q.columns)
# ["foo"]

TODO

  • Add TBA for ODBC connector support

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.2.2.tar.gz (6.0 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.2.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file NetSuite-Connector-0.2.2.tar.gz.

File metadata

  • Download URL: NetSuite-Connector-0.2.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for NetSuite-Connector-0.2.2.tar.gz
Algorithm Hash digest
SHA256 1860f632aa40d4358790173739b83a0faa7c423fe0a8e054193a1b1b131be830
MD5 accbce0aa6f2683aaeebbe70e8859c26
BLAKE2b-256 ba178114b333cf53bf6829731335b86d5810ba3a2372d997b23c12adeaa5aae3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for NetSuite_Connector-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 605dd0a821c28df38fd1fc0e9cce27cdf36bc2f1c37dc974f21245a65a2bad7d
MD5 fafd4dbf382a127fe5055e1a97bfc0c4
BLAKE2b-256 c30b9498b96d69fded22c79949a22e5f44dbd00aa9abed5c1e919c9cb67fbd29

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