samsarahq/samsara-python

AttributeError: 'module' object has no attribute 'verify_ssl'

Opened this issue · 1 comments

We tried the API EXAMPLE and got mutiple issues.

(The provided Example has a broken intendation and the import of the configuration is missing)

a)Intendation is broken
b)In the example there's no import of the configuration.
c)adding "from samsara import configuration" leads to

with samsara.ApiClient(configuration) as api_client:
File "/usr/local/lib/python3.6/dist-packages/samsara/api_client.py", line 75, in init
self.rest_client = rest.RESTClientObject(configuration)
File "/usr/local/lib/python3.6/dist-packages/samsara/rest.py", line 60, in init
if configuration.verify_ssl:
AttributeError: module 'samsara.configuration' has no attribute 'verify_ssl'

av1m commented

The problem comes from the Configuration class
To authenticate yourself, you don't have to go through the Configuration class. You can try something like this

with samsara.ApiClient(header_name='Authorization', header_value=f"Bearer {token}") as api_client:

If you want to use the Configuration class, you have an example here