{ "info": { "author": "Siva Narayanan", "author_email": "siva@fyle.in", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP" ], "description": "# netsuite-sdk-py\nNetsuite-sdk-py is a Python SDK using the SOAP client library zeep(https://python-zeep.readthedocs.io/en/master/) for accessing NetSuite resources via the NetSuite SOAP web service SuiteTalk(http://www.netsuite.com/portal/platform/developer/suitetalk.shtml).\n\n## Installation\n\n\t$ pip install netsuitesdk \n\nRemark: This python NetSuite SDK uses the SOAP/WSDL library [Zeep](https://python-zeep.readthedocs.io/en/master/ \"Zeep\") which should automatically be installed when running above pip-command. Otherwise you can run `$ pip install zeep` first.\n\n## Get Started\n\nThere are the following options to access a NetSuite account via web services: \n- Either pass credentials (email, password, role and account Id) via login and start a request session\n- Pass credentials in the header of each request\n- Use token based authentication (within each request)\n\n### Login with credentials\n\nThe following code performs a login to a NetSuite account and starts a web service session.\n\n```python\nfrom netsuitesdk import NetSuiteClient\n\n# Initialize the NetSuite client instance by passing the application Id\n# which will be passed to the request header in the login operation.\nns = NetSuiteClient(caching='sqlite', debug=True)\n\npassport = ns.create_passport(email=NS_EMAIL,\n password=NS_PASSWORD,\n role=NS_ROLE,\n account=NS_ACCOUNT)\n\n# Authenticate the user and start a new webservice session in NetSuite\nns.login(app_id=NS_APPID, passport=passport)\n\n# Make requests. All requests done in this session will be identified\n# with the application Id passed to the login operation\n\nns.logout()\n```\n\nTo avoid storing the credentials in the python source code file, one can use\npython-dotenv (`$ pip install python-dotenv`) to load authentication \ncredentials from a .env-file as environment variables. The .env-file would look something like this:\n\n```\nNS_EMAIL = '*****@example.com'\nNS_PASSWORD = '*******'\nNS_ROLE = '1047'\nNS_ACCOUNT = '*********'\nNS_APPID = '********-****-****-****-************'\n```\n\nand the variables could be loaded as follows:\n\n```python\nimport os\nfrom dotenv import load_dotenv\n\nload_dotenv()\nNS_EMAIL = os.getenv(\"NS_EMAIL\")\nNS_PASSWORD = os.getenv(\"NS_PASSWORD\")\nNS_ROLE = os.getenv(\"NS_ROLE\")\nNS_ACCOUNT = os.getenv(\"NS_ACCOUNT\")\nNS_APPID = os.getenv(\"NS_APPID\")\n```\n\n### Remarks and possible errors regarding authentication\n**Note:** NetSuite requires two-factor authentication (2FA) for\nall Administrator and other highly privileged roles in all NetSuite accounts.\nInstead, you can login with a non-highly privileged role or use\ntoken based authentication (TBA) with your requests. For TBA, see below.\n\nIf login fails, a NetSuiteLoginError is thrown. \n\nFor more information about NetSuite authentication, see:\n\t(https://docs.oracle.com/cloud/latest/netsuitecs_gs/NSATH/NSATH.pdf)\n\n### Passing credentials with requests\ntba\n\n### Token based authentication\ntba\n\n### Get Request\nA basic example (`ns` is a reference to a `NetSuiteClient` instance):\n```python\nvendor = ns.get('vendor', internalId=ref.internalId)\nns.print_values(vendor)\n```\n\n### Search\nTo perform a search request, use `NetSuite.search`.\nThe SDK provides some utility functions/classes:\n\n- `basic_stringfield_search`: A basic example (`ns` is a reference to a `NetSuiteClient` instance):\n```python\nrecords = ns.basic_stringfield_search(type_name='Vendor',\n attribute='entityId',\n value='Alexander Valley Vineyards',\n operator='is')\nprint(records[0].internalId)\n```\n\n- `PaginatedSearch` (in utils.py):\nIts usage can be seen inside the utility function `NetSuiteClient.paginated_search`\n\n### Upsert\nBasic example(`ns` is a reference to a `NetSuiteClient` instance):\n```python\nvendor = ns.Vendor()\nvendor.externalId = 'test_vendor'\nvendor.companyName = 'Another Test Inc.'\nref = ns.upsert(record=vendor)\n```\n\n### UpsertList\nBasic example(`ns` is a reference to a `NetSuiteClient` instance):\n```python\ncustomer1 = ns.Customer(externalId='customer', email='test1@example.com')\ncustomer2 = ns.Customer(externalId='another_customer', email='test2@example.com')\nns.upsertList(records=[customer1, customer2])\n```\n\n## Documentation\nDocumentation can be found in the docs/_build/html folder (open index.html) and soon in readthedocs.\nFor contributors: to build the documentation (cd to /docs and) run `make buildapi`\nas well as `make html`\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/fylein/netsuite-sdk-py", "keywords": "netsuite,api,python,sdk", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "netsuitesdk", "package_url": "https://pypi.org/project/netsuitesdk/", "platform": "", "project_url": "https://pypi.org/project/netsuitesdk/", "project_urls": { "Homepage": "https://github.com/fylein/netsuite-sdk-py" }, "release_url": "https://pypi.org/project/netsuitesdk/0.3.1/", "requires_dist": [ "zeep" ], "requires_python": "", "summary": "Python SDK for accessing the NetSuite SOAP webservice", "version": "0.3.1" }, "last_serial": 5987940, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "eb683a3c79c40ab056b0e553d89dd169", "sha256": "61f52b16a0e30c81708294b41757e900b64d8ffba80b810c1790418cd0605752" }, "downloads": -1, "filename": "netsuitesdk-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "eb683a3c79c40ab056b0e553d89dd169", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13707, "upload_time": "2019-06-20T05:20:42", "url": "https://files.pythonhosted.org/packages/f7/16/7f92edd3b03b1b88355c7f3c4828d73632acf19958826e188338c99fe8da/netsuitesdk-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1afbc9831803757e4545f9f194851cd", "sha256": "e3f64dab1a74250b05e55e3c8956f4a3138629da2ecd3db7205fdfdaf3c79854" }, "downloads": -1, "filename": "netsuitesdk-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f1afbc9831803757e4545f9f194851cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13323, "upload_time": "2019-06-20T05:20:44", "url": "https://files.pythonhosted.org/packages/df/18/9319d39f0f38f8ccce8c63375b599904d51cef2e6eaa1865bf19c20b7957/netsuitesdk-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "9c022cee7ea9ea8b2fc707b927dffa84", "sha256": "e99dad833b84ef5eab373275852494905b57274919b7fa35ac56887abf5b70e7" }, "downloads": -1, "filename": "netsuitesdk-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9c022cee7ea9ea8b2fc707b927dffa84", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13708, "upload_time": "2019-06-20T08:12:00", "url": "https://files.pythonhosted.org/packages/18/0e/1a938c04fbe63e773bfe507dc130e2b0740b7c292f00c08a5548d9d04950/netsuitesdk-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b01a35ed03de44e3e17be2986387fc39", "sha256": "b20fd30f9d0f95ec7857f705ae9d418df7e87f0fe9e09cf7f0e63904f4349f2d" }, "downloads": -1, "filename": "netsuitesdk-0.2.0.tar.gz", "has_sig": false, "md5_digest": "b01a35ed03de44e3e17be2986387fc39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13326, "upload_time": "2019-06-20T08:12:03", "url": "https://files.pythonhosted.org/packages/d9/30/318a8c7760bd44343e5235fa6a1c03eace9e63cd107abb35c821e0ce057b/netsuitesdk-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "1e515c71e4c827f18ea6ee932f9f60f0", "sha256": "d07b2406a150c5c98eb435be71cb034ef73dc3b47132ed28f470b648a5380774" }, "downloads": -1, "filename": "netsuitesdk-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1e515c71e4c827f18ea6ee932f9f60f0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14810, "upload_time": "2019-06-27T13:40:29", "url": "https://files.pythonhosted.org/packages/88/b2/0105f803b7c2c73c8353dd7512799f043ebcb504be80a234a67b6935099a/netsuitesdk-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b92c4624b8e79215c3ddc908815b0d2c", "sha256": "3ed9c072d2e9c791ded56521e6235591d7feece331b3bf7a2c58422b2ecf4ad3" }, "downloads": -1, "filename": "netsuitesdk-0.3.0.tar.gz", "has_sig": false, "md5_digest": "b92c4624b8e79215c3ddc908815b0d2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14152, "upload_time": "2019-06-27T13:40:31", "url": "https://files.pythonhosted.org/packages/61/29/09fe2f40898917627585f44641820917c61c031b73d58b56dcc43c0380b2/netsuitesdk-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "71158f1eaf325dad32a173e55f7cae47", "sha256": "97ddf0cd36b0faadb65fa2096cd05037e878a8e03deae80419a7cf8ad626b370" }, "downloads": -1, "filename": "netsuitesdk-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "71158f1eaf325dad32a173e55f7cae47", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14781, "upload_time": "2019-10-17T06:39:17", "url": "https://files.pythonhosted.org/packages/66/2f/66a5f98ebfe4e63ba994a9cef2c3791cefe9bedf4c6024468cb879d75136/netsuitesdk-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aafa79301ec71fd00f3203ff0c3be982", "sha256": "4a3c71cc4508c91693f761df3d99c8abc66e6d31eab90ce28b059ea8cf0c0064" }, "downloads": -1, "filename": "netsuitesdk-0.3.1.tar.gz", "has_sig": false, "md5_digest": "aafa79301ec71fd00f3203ff0c3be982", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14131, "upload_time": "2019-10-17T06:39:20", "url": "https://files.pythonhosted.org/packages/dc/d1/e8728ce16210123999e4a088a455f4ce64eb53e0a776895389aa82041c4f/netsuitesdk-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "71158f1eaf325dad32a173e55f7cae47", "sha256": "97ddf0cd36b0faadb65fa2096cd05037e878a8e03deae80419a7cf8ad626b370" }, "downloads": -1, "filename": "netsuitesdk-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "71158f1eaf325dad32a173e55f7cae47", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14781, "upload_time": "2019-10-17T06:39:17", "url": "https://files.pythonhosted.org/packages/66/2f/66a5f98ebfe4e63ba994a9cef2c3791cefe9bedf4c6024468cb879d75136/netsuitesdk-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aafa79301ec71fd00f3203ff0c3be982", "sha256": "4a3c71cc4508c91693f761df3d99c8abc66e6d31eab90ce28b059ea8cf0c0064" }, "downloads": -1, "filename": "netsuitesdk-0.3.1.tar.gz", "has_sig": false, "md5_digest": "aafa79301ec71fd00f3203ff0c3be982", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14131, "upload_time": "2019-10-17T06:39:20", "url": "https://files.pythonhosted.org/packages/dc/d1/e8728ce16210123999e4a088a455f4ce64eb53e0a776895389aa82041c4f/netsuitesdk-0.3.1.tar.gz" } ] }