Skip to content
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

Use requests.Session in trello.trelloclient #303

Open
delucks opened this issue Feb 9, 2020 · 0 comments
Open

Use requests.Session in trello.trelloclient #303

delucks opened this issue Feb 9, 2020 · 0 comments

Comments

@delucks
Copy link
Contributor

delucks commented Feb 9, 2020

Since the trello.TrelloClient object is typically long-lived and used for multiple calls to the Trello API, using requests.Session instead of requests.request() would allow us to take advantage of connection pooling for better efficiency and fewer round trips. This could potentially increase the performance of the entire library in one go. Default headers like Accept: application/json, API authentication with self.oauth, and proxy settings with self.proxies can be set at the Session level and reused between requests. Since the API for requests.Session is the same as the main requests API, this should be a nearly drop-in change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant