Skip to main content

A Python client library for interacting with NetSuite's REST and SuiteQL APIs

Project description

NetSuite Client Library

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-library

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:

  1. Go to Setup > Integration > Manage Integrations > New
  2. Enable Token-Based Authentication
  3. Copy the Consumer Key and Consumer Secret
  4. 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 ID
  • account: Your NetSuite account ID (the xxxxx part of xxxxx.app.netsuite.com)
  • consumer_key: OAuth consumer key from your integration record
  • consumer_secret: OAuth consumer secret from your integration record
  • token_id: OAuth token ID from your access token
  • token_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


Download files

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

Source Distribution

netsuite_client-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

netsuite_client-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file netsuite_client-0.1.0.tar.gz.

File metadata

  • Download URL: netsuite_client-0.1.0.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

Hashes for netsuite_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e26ace666010e078eda2d6ba2f9162af83ff967943d6a354a838fceb17af3317
MD5 564f96641f2e3e890f39429c4463a0f4
BLAKE2b-256 7bd776a320c1987b5bbc6f5479d4d8543b0f17654c2fc9d842e7a2c719635ce1

See more details on using hashes here.

Provenance

The following attestation bundles were made for netsuite_client-0.1.0.tar.gz:

Publisher: publish.yml on Continuous-AI/netsuite-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file netsuite_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for netsuite_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 083e2974930d181756fafe09e5e76018aac8bc617aca163bb9128d9cd6810ead
MD5 4b742987ff653fcbfc95a7ecacb137ad
BLAKE2b-256 2cad6b726db7504af6db93d173fc2afea297b2cfc63b7da4ba22d13a74518b05

See more details on using hashes here.

Provenance

The following attestation bundles were made for netsuite_client-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Continuous-AI/netsuite-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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