Is the Session object from Python's Requests library thread safe?

后端 未结 2 691
旧巷少年郎
旧巷少年郎 2020-12-05 16:59

Python\'s popular Requests library is said to be thread-safe on its home page, but no further details are given. If I call requests.session(), can I then safely

2条回答
  •  渐次进展
    2020-12-05 17:33

    https://github.com/kennethreitz/requests/issues/1871 implies that Session is not thread-safe, and that at least one maintainer recommends one Session per thread.

    I just opened https://github.com/kennethreitz/requests/issues/2766 to clarify the documentation.

提交回复
热议问题