Skip to main content

New level of functionality and performance in data access via Python

Project description

Python Connector for NetSuite

Python Connector for NetSuite is a connectivity solution for accessing NetSuite from Python applications to read and update data. It fully implements the Python DB API 2.0 specification. The connector is distributed as a wheel package for Windows and Windows Server.

Standard SQL syntax

The connector fully supports the ANSI SQL standard and lets you execute SQL statements against your NetSuite data just like you would normally work with relational databases. Simple queries are directly converted to NetSuite API calls and executed on the NetSuite side.

Connecting

To establish a connection to NetSuite, import the connector and authenticate using basic, token-based, or OAuth 2.0 authentication.

Import the connector

First, import the NetSuite connector module:

import devart.netsuite as netsuite

Establish a connection

Connect to your NetSuite account using the connect() module method and obtain a connection object.

You can connect to NetSuite using basic, token-based, or OAuth 2.0 authentication.

Basic authentication

For basic authentication, provide your NetSuite account details:

my_connection = netsuite.connect(
    Ver=1,    Authentication="Basic",    UserID="your_username",    Password="your_password",    AccountId="your_account_id",    RoleId="your_role_id",    ApplicationId="your_application_id"
)

Replace the example values with your actual NetSuite credentials.

Token-based authentication

For token-based authentication, provide your NetSuite account and token details:

my_connection = netsuite.connect(
    Version="Ver2",
    Authentication="TokenBased",
    AccountId="your_account_id",
    AccountTimeZone="your_account_timezone",
    ConsumerKey="your_consumer_key",
    ConsumerSecret="your_consumer_secret",
    TokenId="your_token_id",
    TokenSecret="your_token_secret"
)

Replace the example values with your actual token credentials.

OAuth 2.0 authentication

For OAuth 2.0 authentication, first obtain a refresh token, then use it to establish the connection:

response = netsuite.signin(
    AccountId="your_account_id",
    ClientId="your_client_id",
    ClientSecret="your_client_secret")
my_connection = netsuite.connect(
    Authentication="OAuth",
    AccountID="your_account_id",
    AccountTimeZone="your_account_timezone",
    ClientID="your_client_id",
    ClientSecret="your_client_secret",
    RefreshToken=response["Refresh Token"]
)

Replace the example values with your actual OAuth credentials.

Querying data

Once connected to NetSuite, you can execute SQL queries to retrieve data from NetSuite.

Execute a query

Create a cursor object using the cursor() connection method.

my_cursor = my_connection.cursor()

Execute a SQL query using the execute() cursor method.

my_cursor.execute("SELECT * FROM employees")

Retrieve results using one of the fetch*() methods.

for row in my_cursor.fetchall(): 
    print(row)

Parameterized queries

You can use parameterized queries to pass variable values to your SQL statements. This allows you to reuse the same query with different data and helps to prevent SQL injection attacks.

Pass parameters as a list or tuple to the

execute()

method:

query = "SELECT Id, Name FROM Contact WHERE Name = ? AND Email = ?"
params = ["Jordan Sanders", "jordansanders@example.com"]
my_cursor.execute(query, params)
results = my_cursor.fetchall()
for row in results:
    print(row)

Each placeholder ? in the query is replaced with a corresponding value from the parameter list.

Ordering and activating the license

You can purchase a license for the connector on the ordering page:
https://www.devart.com/python/netsuite/ordering.html

To activate the license, follow the instructions in the documentation:
https://docs.devart.com/python/netsuite/activate-a-license.htm

What's new

Python Connector for NetSuite 1.3

  • Added support for Python 3.14

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

devart_netsuite_connector-1.3.0-cp314-cp314-win_amd64.whl (6.2 MB view details)

Uploaded CPython 3.14Windows x86-64

devart_netsuite_connector-1.3.0-cp314-cp314-win32.whl (5.9 MB view details)

Uploaded CPython 3.14Windows x86

devart_netsuite_connector-1.3.0-cp313-cp313-win_amd64.whl (6.2 MB view details)

Uploaded CPython 3.13Windows x86-64

devart_netsuite_connector-1.3.0-cp313-cp313-win32.whl (5.9 MB view details)

Uploaded CPython 3.13Windows x86

devart_netsuite_connector-1.3.0-cp312-cp312-win_amd64.whl (6.2 MB view details)

Uploaded CPython 3.12Windows x86-64

devart_netsuite_connector-1.3.0-cp312-cp312-win32.whl (5.9 MB view details)

Uploaded CPython 3.12Windows x86

devart_netsuite_connector-1.3.0-cp311-cp311-win_amd64.whl (6.2 MB view details)

Uploaded CPython 3.11Windows x86-64

devart_netsuite_connector-1.3.0-cp311-cp311-win32.whl (5.9 MB view details)

Uploaded CPython 3.11Windows x86

devart_netsuite_connector-1.3.0-cp310-cp310-win_amd64.whl (6.2 MB view details)

Uploaded CPython 3.10Windows x86-64

devart_netsuite_connector-1.3.0-cp310-cp310-win32.whl (5.9 MB view details)

Uploaded CPython 3.10Windows x86

devart_netsuite_connector-1.3.0-cp39-cp39-win_amd64.whl (6.2 MB view details)

Uploaded CPython 3.9Windows x86-64

devart_netsuite_connector-1.3.0-cp39-cp39-win32.whl (5.9 MB view details)

Uploaded CPython 3.9Windows x86

devart_netsuite_connector-1.3.0-cp38-cp38-win_amd64.whl (6.2 MB view details)

Uploaded CPython 3.8Windows x86-64

devart_netsuite_connector-1.3.0-cp38-cp38-win32.whl (5.9 MB view details)

Uploaded CPython 3.8Windows x86

devart_netsuite_connector-1.3.0-cp37-cp37m-win_amd64.whl (6.2 MB view details)

Uploaded CPython 3.7mWindows x86-64

devart_netsuite_connector-1.3.0-cp37-cp37m-win32.whl (5.9 MB view details)

Uploaded CPython 3.7mWindows x86

File details

Details for the file devart_netsuite_connector-1.3.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 848222c2c612b6a203acb27a63de1ad2ce1f728820c635f05d1befac129d279d
MD5 ddc49a7695b2f6de97c19a99f2e28103
BLAKE2b-256 29edb40d0d629dd9e7764b2f281abcca6b8d0354d657ddd128879b7e4db089d3

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp314-cp314-win32.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 af3e9bd44ab70db38b7f88dfd3c079934a417ebe9cda7faa5ca31e01b5bf4538
MD5 6f9b6b0fcb4849f7f20f753337dfd611
BLAKE2b-256 8d7bf546cec680999d86b3037f24db32229d99631437f05d3b9effe6997b1d62

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 57c03781c4f074551157f506a5043d02c8101dd609217f915fa367fa9f1e8691
MD5 efc724ab4e8723d9db567d74bbda2dd2
BLAKE2b-256 55a66bbe6a59452b0770fdd162f1f54d87cee00c7e772525ddf2df3a7d8149c1

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp313-cp313-win32.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 f9b3523148d2dc588231316f1b516b31f337ff8bc9eaddd9885af8f2a5ae0056
MD5 38aadd58464d261fdb47e7eb144e7783
BLAKE2b-256 4fcc04cd794e07a3078e64855cd2975838209a0fafe1c539063e97f0cd21f79a

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8eb1f5e0bc25fd03f217dd48a43f85a6551de9ee695ea1a00d3920a95e6edaa0
MD5 d780422c9d3376afdc634c68a9b8d1b7
BLAKE2b-256 0593fb61455dbcf9af07e34bd2c1be1b7d115bc4f0c78353e71c5e0577dd2d59

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp312-cp312-win32.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 60bf2b2bde017538ff2238f4a092c44dc834f7a8c7ad2643d675cebab6dfb9e2
MD5 f5ba06e151703a116d31dbea1a135998
BLAKE2b-256 ffad6f445410b3486757636f8169bf16e15e30d7e829b89591b2bdb2f22ce67b

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5cde1cf328c4033b0f483e6092b621d82c04521a7c3e69286daae3ccb7ff70d9
MD5 7cf166103bd673162febe477f0f533d5
BLAKE2b-256 f3756377b5c6c6aca3d9e3b2c9cdb91e8a287c49fbb007532e2fdfe4066c2d46

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp311-cp311-win32.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 f7607aacbb02a0ba539c1aa7e2462c2d210470dff425e12e3e107b9720b39605
MD5 7684f9c903fde04af36a9f4a07ec37f7
BLAKE2b-256 1f9de714bbdcc9cce74efe880483d5bd458ea6a7896b6650f5fcb1315a596053

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4ea0b32dd69cf5d940fc5dacfb6a72d0d7d1de1dddab1f2e6e5c6058d280577a
MD5 4b4caff19080a96bd7ce59da829250a0
BLAKE2b-256 82ceaf10c17eb10edfbac9608c3ad955a2d389a7b58feaa5a3228824e720edb9

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp310-cp310-win32.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 4a45705500de596150de9531b5a77f7c33dd8a1294e0599e15ade30b903dec9c
MD5 061b5a7a83efa5748331894561fba355
BLAKE2b-256 110f5a62de62985d805e6bcc16fc7b469cbe450ecc834fd52227fc87b09d781d

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 8937d35898f7126b4ef18a39e4fae095889eed8360c162b377f07d84ca7dfb5b
MD5 1b37229d7cc24cc0fd4728cd71cffa29
BLAKE2b-256 c4fe9f95c25beaaba9f45074528fd696b1be022a09662171d26ef59444feec29

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp39-cp39-win32.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 e39295280a57257e4668f899fd098a2728c992983bf7489f77e78098e643370f
MD5 ef89f4fc2cc23895e939ef4d8771efbe
BLAKE2b-256 01a65d8c311bad743213382a8539b8047200dfeb33611cacc6f956ce1613d64b

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 9fadd1cfe7edaca8fe00fb4780b5bc901fd4bb0f24a3d4252ff50f0dd3b3c13f
MD5 eca8b3b233a990497accb6934a764247
BLAKE2b-256 efd3c1f5f577faf89b97de501b5ba74f85fb4d448f34f7eee47684d9ccc59323

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp38-cp38-win32.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 45be6b7061f213715e47ec20739b057f7118cc2acb821e116b764a4b8655a5bc
MD5 56f10dce352bb4c5cabc6e40faaa9db3
BLAKE2b-256 2192f375c5f756f64c45c9c49e765df6a898a5e0dd54280190bfa64bd17f686a

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 55cd9467cd8c3edff19daab1668a89d324c7c109477e310dc0a3eb48de04cbc3
MD5 3826bf8f56ee837c35639871fb37fa7d
BLAKE2b-256 e5431608932ec01ef3a26f1cf87d1649920d611ae452b654dea6dcfa7135937a

See more details on using hashes here.

File details

Details for the file devart_netsuite_connector-1.3.0-cp37-cp37m-win32.whl.

File metadata

File hashes

Hashes for devart_netsuite_connector-1.3.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 70b244cfdfb64011af08044b1788cb4f1df826a4737790d0ed93877db8d1f643
MD5 1b5f9a3969f028389d098e14377df111
BLAKE2b-256 35d0b51e8e516c2a2cf757da4b2d2c0fa59fbf496f2087cc13484e71f7c4503a

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