Skip to main content

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:

  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.1.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.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

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

Hashes for netsuite_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a168f63104438b811e25489595a1cd1a818aea13e7b2a21d39cb67f7fa41fa71
MD5 790a9860c035fc02ac266344f1a273a0
BLAKE2b-256 602fa95eaf0b68be111332d58f15d6387ad264679f0da4c58d5cd434fe287f1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for netsuite_client-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for netsuite_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 13ff10af008293ad891fa4d9a7a3f82f00c8e865a41d5e8cb9c562f7060dee42
MD5 ee691b678e7f6f7e79761a154a2361c0
BLAKE2b-256 dadd87f7e05a8529adc56956d26d8295c4b5ea1bc4f5ea1e07b48e2b17e9fa40

See more details on using hashes here.

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

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