Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential documentation improvements. #86

Open
pgp-admin opened this issue Mar 5, 2024 · 2 comments
Open

Potential documentation improvements. #86

pgp-admin opened this issue Mar 5, 2024 · 2 comments

Comments

@pgp-admin
Copy link
Contributor

pgp-admin commented Mar 5, 2024

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!

@iloveitaly
Copy link
Collaborator

Want to submit a PR?

@pgp-admin
Copy link
Contributor Author

PR submitted :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants