
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
netsuite-db-connector
Advanced tools
Connects NetSuite to a database connector to transfer information to and fro
Warning: This project is undergoing active development and is not yet production-grade. Please mail the author if you want to find out more
Connects NetSuite to a database to transfer information to and fro.
This project requires Python 3+.
Download this project and use it (copy it in your project, etc).
Install it from pip.
$ pip install netsuite-db-connector
To use this connector you'll need connect to a NetSuite account via Token-based Authentication (TBA).
First, setup TBA credentials using environment variables.
# TBA credentials
export NS_ACCOUNT=xxxx
export NS_CONSUMER_KEY=xxxx
export NS_CONSUMER_SECRET=xxxx
export NS_TOKEN_KEY=xxxx
export NS_TOKEN_SECRET=xxxx
Here's example usage.
import os
import sqlite3
from netsuitesdk import NetSuiteConnection
from netsuite_db_connector import NetSuiteExtractConnector, NetSuiteLoadConnector
def ns_connect():
NS_ACCOUNT = os.getenv('NS_ACCOUNT')
NS_CONSUMER_KEY = os.getenv('NS_CONSUMER_KEY')
NS_CONSUMER_SECRET = os.getenv('NS_CONSUMER_SECRET')
NS_TOKEN_KEY = os.getenv('NS_TOKEN_KEY')
NS_TOKEN_SECRET = os.getenv('NS_TOKEN_SECRET')
nc = NetSuiteConnection(account=NS_ACCOUNT, consumer_key=NS_CONSUMER_KEY, consumer_secret=NS_CONSUMER_SECRET, token_key=NS_TOKEN_KEY, token_secret=NS_TOKEN_SECRET)
return nc
ns = ns_connect()
dbconn = sqlite3.connect('/tmp/ns.db', detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)
x = NetSuiteExtractConnector(ns=ns, dbconn=dbconn)
x.create_tables()
x.extract_currencies()
x.extract_accounts()
x.extract_departments()
x.extract_locations()
x.extract_vendors()
x.extract_classifications()
y = NetSuiteLoadConnector(ns=ns, dbconn=dbconn)
y.create_tables()
# do some transformations and populated vendor bills related load tables
for vendor_bill_external_id in y.get_vendor_bill_external_ids():
internal_id = y.load_vendor_bill(vendor_bill_external_id=vendor_bill_external_id)
print(f'posted vendor_bill_id {vendor_bill_external_id} for which NS returned {internal_id}')
To contribute to this project follow the steps
pip install -r requirements.txt.git/hooks/pre-commit#!/usr/bin/env bash
git-pylint-commit-hook
To run unit tests, run pytest in the following manner:
python -m pytest test/unit
You should see something like this:
...
To run unit tests, you will need to connect to a real NetSuite account. Set the following environment variables before running the integration tests:
# TBA credentials
export NS_ACCOUNT=xxxx
export NS_CONSUMER_KEY=xxxx
export NS_CONSUMER_SECRET=xxxx
export NS_TOKEN_KEY=xxxx
export NS_TOKEN_SECRET=xxxx
To get code coverage report, run this command:
python -m pytest --cov=netsuite_db_connector
<snipped output>
To get an html report, run this command:
python -m pytest --cov=netsuite_db_connector --cov-report html:cov_html
We want to maintain code coverage of more than 95% for this project at all times.
This project is licensed under the MIT License - see the LICENSE file for details
FAQs
Connects NetSuite to a database connector to transfer information to and fro
We found that netsuite-db-connector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.