at-gmbh / personio-py

a lightweight Personio API client
https://at-gmbh.github.io/personio-py
Apache License 2.0
26 stars 17 forks source link

add support for providing a custom `requests.Session` in client #39

Closed syphar closed 10 months ago

syphar commented 11 months ago

Checklist for your PR

Hints

codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (b5ead78) 87.31% compared to head (51915ea) 87.32%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #39 +/- ## ========================================== + Coverage 87.31% 87.32% +0.01% ========================================== Files 7 7 Lines 946 947 +1 ========================================== + Hits 826 827 +1 Misses 120 120 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

syphar commented 11 months ago

@klamann we found that this feature would have helped us writing cleaner code.

In our case we wanted retries for HTTP requests, and with the option to hand in a custom session this would have worked more easily.

Another usecase I can imagine for this would be proxies.

If the general feature is fine with you, I'll do tests & changelog.

klamann commented 11 months ago

I like the idea, and the change seems to be simple enough. I'm willing to merge this if you add a test case and changelog entry.

syphar commented 11 months ago

@klamann I updated the changelog, and added a short test with a custom session.

klamann commented 10 months ago

sorry for the deplay; merging!