Skip to content

0.4.0 - Lemmy 0.19.X updates

Compare
Choose a tag to compare
@tjkessler tjkessler released this 24 Dec 21:19
· 32 commits to main since this release
24c412f

Updates Plemmy to play nice with Lemmy 0.19.X instances.

  • LemmyHttp object now optionally accepts a jwt token on __init__ if LemmyHttp.login method not called afterwards
  • jwt token is no longer stored in the LemmyHttp object, it is passed directly to a requests.Session object
  • plemmy.utils.create_session function accepts headers and jwt token, returns requests.Session object
    • used in LemmyHttp.__init__ and LemmyHttp.login
  • plemmy.utils.get_handler, plemmy.utils.post_handler, and plemmy.utils.put_handler now accept a requests.Session object as their first arguments
  • Updated all LemmyHttp methods to pass requests.Session object (LemmyHttp._session attribute) to updated utils functions