A Python client library for interacting with NetSuite's REST and SuiteQL APIs
Project description
NetSuite Client
A Python client library for interacting with NetSuite's REST and SuiteQL APIs.
Features
- OAuth 1.0 authentication with NetSuite
- Support for REST API calls
- SuiteQL query execution
- Custom scriptlet execution
Installation
pip install netsuite-client
Quick Start
from netsuite_client import NetSuiteClient
# Initialize the client
client = NetSuiteClient(
realm="YOUR_REALM",
account="YOUR_ACCOUNT",
consumer_key="YOUR_CONSUMER_KEY",
consumer_secret="YOUR_CONSUMER_SECRET",
token_id="YOUR_TOKEN_ID",
token_secret="YOUR_TOKEN_SECRET"
)
# Execute a SuiteQL query
results = client.get_suiteql_query("SELECT * FROM transaction WHERE tranDate = '2024-01-01'")
# Execute a custom scriptlet
results = client.get_scriptlet({"script": "123", "deploy": "1"})
Authentication
This library uses OAuth 1.0 for authentication. You'll need to set up an integration record in your NetSuite account to get the required credentials:
- Go to Setup > Integration > Manage Integrations > New
- Enable Token-Based Authentication
- Copy the Consumer Key and Consumer Secret
- Create an Access Token and copy the Token ID and Token Secret
Configuration
The following parameters are required to initialize the client:
realm: Your NetSuite realm IDaccount: Your NetSuite account ID (the xxxxx part of xxxxx.app.netsuite.com)consumer_key: OAuth consumer key from your integration recordconsumer_secret: OAuth consumer secret from your integration recordtoken_id: OAuth token ID from your access tokentoken_secret: OAuth token secret from your access token
Optional parameters:
timeout: Request timeout in seconds (default: 60)logger: Custom logger instance (default: standard logging)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
Credits
Created and maintained by Continuous AI, Inc.
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_client-0.1.1.tar.gz.
File metadata
- Download URL: netsuite_client-0.1.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a168f63104438b811e25489595a1cd1a818aea13e7b2a21d39cb67f7fa41fa71
|
|
| MD5 |
790a9860c035fc02ac266344f1a273a0
|
|
| BLAKE2b-256 |
602fa95eaf0b68be111332d58f15d6387ad264679f0da4c58d5cd434fe287f1e
|
Provenance
The following attestation bundles were made for netsuite_client-0.1.1.tar.gz:
Publisher:
publish.yml on Continuous-AI/netsuite-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netsuite_client-0.1.1.tar.gz -
Subject digest:
a168f63104438b811e25489595a1cd1a818aea13e7b2a21d39cb67f7fa41fa71 - Sigstore transparency entry: 196108770
- Sigstore integration time:
-
Permalink:
Continuous-AI/netsuite-client@10859a1b681dc6de1aa21c956fe5faf31adb780e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Continuous-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@10859a1b681dc6de1aa21c956fe5faf31adb780e -
Trigger Event:
release
-
Statement type:
File details
Details for the file netsuite_client-0.1.1-py3-none-any.whl.
File metadata
- Download URL: netsuite_client-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13ff10af008293ad891fa4d9a7a3f82f00c8e865a41d5e8cb9c562f7060dee42
|
|
| MD5 |
ee691b678e7f6f7e79761a154a2361c0
|
|
| BLAKE2b-256 |
dadd87f7e05a8529adc56956d26d8295c4b5ea1bc4f5ea1e07b48e2b17e9fa40
|
Provenance
The following attestation bundles were made for netsuite_client-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on Continuous-AI/netsuite-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netsuite_client-0.1.1-py3-none-any.whl -
Subject digest:
13ff10af008293ad891fa4d9a7a3f82f00c8e865a41d5e8cb9c562f7060dee42 - Sigstore transparency entry: 196108771
- Sigstore integration time:
-
Permalink:
Continuous-AI/netsuite-client@10859a1b681dc6de1aa21c956fe5faf31adb780e -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Continuous-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@10859a1b681dc6de1aa21c956fe5faf31adb780e -
Trigger Event:
release
-
Statement type: