-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add option to pass other settings to requests lib #13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this feature!
@@ -217,7 +234,7 @@ def _select(select): | |||
|
|||
|
|||
def download_data(table_id, dir=None, typed=False, select=None, filters=None, | |||
catalog_url=None, proxies=None): | |||
catalog_url=None, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API will prevent the usage of kwargs for filters in the future without breaking backwards compatibility (such as in django). Please consider that when making this design choice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this feedback. I think I will implement something like this in the OData4 version #8. This OData3 API deprecates in 2020.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a partial implementation of an OData query parser if anyone is interested (grammar + a number of abstract syntax tree manipulations to rewrite it).
Unfortunate it is part of a larger prototype that is not release ready - but ping me if there is interest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm welcoming all contributions to the OData version 4 API :)
@proxies.setter | ||
def proxies(self, proxies): | ||
warnings.warn( | ||
"Deprecated, use options.requests['proxies'] instead", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice forward compatibility 👍
@joosbuijsNL can you test this implementation? |
Confirmed, this works! Thanks a lot! :) |
Closes #12 |
Solution for #12.
proxies
,verify
andcert
can be passed to every request incbsodata
.proxies
,verify
andcert
with thecbsodata.options.requests
setting.