Skip to content

Potential documentation improvements. #86

@pgp-admin

Description

@pgp-admin

Hello,

Firstly, thank you for developing this great module. It is very convenient and meets all our requirements. Recently, I deployed an app with strict permissions for the user executing the app and noticed that Zeep, by default, uses an SQLite cache backend. This caused the app to fail for us because the user had no permissions to write outside of the application directory. After a closer inspection, I noticed the NetSuite class allows for a cache parameter to be passed via soap_api_options. I'm sharing this so others with a similar problem may find it helpful.

from netsuite import NetSuite, Config, TokenAuth
from zeep.cache import InMemoryCache

config = Config(...)

# Specify InMemoryCache in soap_api_options
soap_api_options = {"cache": InMemoryCache()}

connector = NetSuite(config, soap_api_options=soap_api_options)

An alternative approach would be to specify the path for the SQLite backend as shown in their documentation.

Another interesting issue we ran into was trying to download files larger than 10MB using the SOAP API. By default, Zeep's settings prevent that (response is truncated) unless we set xml_huge_tree to True, like so:

connector = NetSuite(config)
connector.soap_api.client.settings.xml_huge_tree = True

Hope this helps. Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions