Skip to content
This repository was archived by the owner on Apr 30, 2022. It is now read-only.

Commit d2db903

Browse files
author
Jun Li
authored
config verify by default (#135)
* config verify by default true * better naming * bump version * format fix * bump version again * update readme * fix dependance package version
1 parent 36d9abf commit d2db903

File tree

6 files changed

+16
-7
lines changed

6 files changed

+16
-7
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
/dist
99
/tmp/
1010
.idea/*
11-
venv
11+
venv
12+
/.DS_Store

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,16 @@ pip3 install quandl
3333
| max_wait_between_retries | Maximum amount of time in seconds that should be waited before attempting a retry. Only used if `use_retries` is True | 8
3434
| retry_backoff_factor | Determines the amount of time in seconds that should be waited before attempting another retry. Note that this factor is exponential so a `retry_backoff_factor` of 0.5 will cause waits of [0.5, 1, 2, 4, etc]. Only used if `use_retries` is True | 0.5
3535
| retry_status_codes | A list of HTTP status codes which will trigger a retry to occur. Only used if `use_retries` is True| [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]
36-
36+
3737
```python
3838
import quandl
3939
quandl.ApiConfig.api_key = 'tEsTkEy123456789'
4040
quandl.ApiConfig.api_version = '2015-04-09'
4141
```
42+
By default, SSL verification is enabled. To bypass SSL verification
43+
```python
44+
quandl.ApiConfig.verify_ssl = False
45+
```
4246

4347
`quandl.ApiConfig.api_version` is optional however it is strongly recommended to avoid issues with rate-limiting. For premium databases, datasets and datatables `quandl.ApiConfig.api_key` will need to be set to identify you to our API. Please see [API Documentation](https://www.quandl.com/docs/api) for more detail.
4448

@@ -122,7 +126,7 @@ The following are instructions for running our tests:
122126
`python setup.py install`
123127
4. Run the following command to test the plugin in all versions of python we support:
124128
`tox`
125-
129+
126130
Once you have all required packages installed, you can run tests locally with:
127131

128132
Running all tests locally

quandl/api_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class ApiConfig:
1313
retry_backoff_factor = 0.5
1414
max_wait_between_retries = 8
1515
retry_status_codes = [429] + list(range(500, 512))
16+
verify_ssl = True
1617

1718

1819
def save_key(apikey, filename=None):

quandl/connection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ def execute_request(cls, http_verb, url, **options):
4242
session = cls.get_session()
4343

4444
try:
45-
response = session.request(method=http_verb, url=url, **options)
45+
response = session.request(method=http_verb,
46+
url=url,
47+
verify=ApiConfig.verify_ssl,
48+
**options)
4649
if response.status_code < 200 or response.status_code >= 300:
4750
cls.handle_api_error(response)
4851
else:

quandl/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '3.4.6'
1+
VERSION = '3.4.8'

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
'inflection >= 0.3.1',
2323
'python-dateutil',
2424
'six',
25-
'more-itertools'
25+
'more-itertools <= 5.0.0'
2626
]
2727

2828
installs_for_two = [
@@ -64,7 +64,7 @@
6464
install_requires=install_requires,
6565
tests_require=[
6666
'flake8',
67-
'nose',
67+
'nose <= 1.3.7',
6868
'httpretty',
6969
'mock',
7070
'factory_boy',

0 commit comments

Comments
 (0)