ckan / ckanapi

A command line interface and Python module for accessing the CKAN Action API
Other
176 stars 74 forks source link

Suggestion: provide ability to specify custom requests session #121

Closed Toshakins closed 6 years ago

Toshakins commented 6 years ago

In custom scenarios, it could be helpful to have additional control over HTTP transport(i.e. requests library). Example: retry with exponential back-off or switching off SSL verification in local environments.

I propose to add a new parameter(session) to the RemoteCKAN's constructor.

Moreover, if that's a case, I would like to help with the implementation :)

Do maintainers consider this proposal useful?

mcarans commented 6 years ago

I am not a maintainer but I consider this extremely useful. In fact I was just about to open a ticket for retry logic!

mcarans commented 6 years ago

@wardi @davidread What do you think?

mcarans commented 6 years ago

@Toshakins I suggest making a pull request and then we can ask for it to be reviewed.

mcarans commented 6 years ago

I have made a pull request: https://github.com/ckan/ckanapi/pull/122

Toshakins commented 6 years ago

Closing this issue as PR got merged. The detachable session is available in the master branch. The change will be available through Pypy after the next release.