netsuite-oauth-python
OAuth 1.0 (Token-Based Authentication) client for NetSuite REST APIs and RESTlets.
Installation
pip install netsuite-oauth-python
Quick start
from netsuite_oauth import NetsuiteOauth
client = NetsuiteOauth(
url="https://1234567.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=1234&deploy=1",
consumer_key="YOUR_CONSUMER_KEY",
consumer_secret="YOUR_CONSUMER_SECRET",
token_id="YOUR_TOKEN_ID",
token_secret="YOUR_TOKEN_SECRET",
account="1234567",
)
response = client.get()
print(response.content)
API
| Method | Description |
|---|---|
get(params=None, headers=None, **kwargs) |
Authenticated GET |
post(data=None, headers=None, **kwargs) |
Authenticated POST (JSON body) |
put(data=None, headers=None, **kwargs) |
Authenticated PUT (JSON body) |
patch(data=None, headers=None, **kwargs) |
Authenticated PATCH (JSON body) |
delete(headers=None, **kwargs) |
Authenticated DELETE |
request(method, data=None, params=None, headers=None, **kwargs) |
Arbitrary HTTP method |
All methods return a requests.Response and call raise_for_status() on failure.
# POST JSON
response = client.post({"name": "Acme"})
# Custom headers / query params
response = client.get(params={"limit": 10}, headers={"Prefer": "transient"})
Requirements
- Python 3.8+
requestsrequests-oauthlib
Development
git clone https://github.com/karthous/netsuite_oauth_python.git
cd netsuite_oauth_python
pip install -e .
Build and publish:
pip install build twine
python -m build
twine check dist/*
twine upload dist/*
Maintainers
Disclaimer
This is not an official product of Oracle or NetSuite. Use at your own risk. By using this software, you agree not to:
- Violate any laws.
- Produce any harm to a person or persons.
- Disseminate any personal information that would be meant for harm.
- Spread misinformation.
- Target vulnerable groups.
Metadata
Release files for netsuite-oauth-python 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| netsuite_oauth_python-1.0.0.tar.gz | 4.5 kB | Without provenance | Details for netsuite_oauth_python-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| netsuite_oauth_python-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for netsuite_oauth_python-1.0.0-py3-none-any.whl |
Total release size: 9.5 kB
Release files / netsuite_oauth_python-1.0.0.tar.gz
| Download URL | netsuite_oauth_python-1.0.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83a01750c81796535983553449717608de91f2d1e2aaf4f3417790f8b0219f0c
|
|
BLAKE2b-256 checksum How to use checksums |
f69166f9556aeacdc5ea571e4a27dd18eb25ed890c1aae7b67731a6a665f4da6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Release files / netsuite_oauth_python-1.0.0-py3-none-any.whl
| Download URL | netsuite_oauth_python-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b62e1d53bbf637abf52d11e1a1696ee63ddeef09d52c103e5a46ff698ccdcf51
|
|
BLAKE2b-256 checksum How to use checksums |
0793762e8933190f23a92a0a686d25656d63aa462842f33e187f83f023b23f7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Security for netsuite-oauth-python 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.