dropbox / dropbox/PyHive

SSL presto

Open
#203 13 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.7k
Forks
545
PR merge metrics
No merged PRs in 30d

Description

Hi

I am trying to connect to a https presto endpoint, with basic auth. I could'nt find a way to specify a certifficate file, or a pem file. I actually dig into the source code, and the only way I got working was by doing this:

```
from sqlalchemy.engine import create_engine
from requests.auth import HTTPBasicAuth

engine = create_engine(
'presto://@:/hive',
connect_args={
'protocol': 'https',
'requests_kwargs':{'auth': HTTPBasicAuth('',''), 'verify':False}
}
)
```

I also tried that :

```
from sqlalchemy.engine import create_engine
from requests.auth import HTTPBasicAuth

engine = create_engine(
'presto://@:/hive',
connect_args={
'protocol': 'https',
'requests_kwargs':{'auth': HTTPBasicAuth('','')
, 'verify':True, 'cert':'/path/to/file.pem'}
}
)
```
But I got a ssl error.

Is there any way to pass the certificate ?

Thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.