palantir / conjure-python-client

Python client and JSON encoders for use with generated Conjure clients
Apache License 2.0
7 stars 20 forks source link

Enable passing a session in ServiceConfiguration #126

Open zymergy opened 1 year ago

zymergy commented 1 year ago

Before this PR

While the Service class uses a requests.Session object internally, there is no way to provide an existing Session object to the Service at initialization. This simply adds the ability to provide an existing session instead of always creating a new empty session

After this PR

ServiceConfiguration objects may now contain a requests.Session object that will be inherited by clients initialized from the object

Possible downsides?

changelog-app[bot] commented 1 year ago

Generate changelog in changelog-dir>`changelog/@unreleased`</changelog-dir

Type

- [ ] Feature - [ ] Improvement - [ ] Fix - [ ] Break - [ ] Deprecation - [ ] Manual task - [ ] Migration

Description

Enable passing a session in ServiceConfiguration ## Before this PR While the Service class uses a requests.Session object internally, there is no way to provide an existing Session object to the Service at initialization. This simply adds the ability to provide an existing session instead of always creating a new empty session ## After this PR ServiceConfiguration objects may now contain a requests.Session object that will be inherited by clients initialized from the object ## Possible downsides? **Check the box to generate changelog(s)** - [ ] Generate changelog entry