Plemmy Versions Save

A Python package for accessing the LemmyHttp API

0.4.2

2 months ago

See https://github.com/Fedihosting-Foundation/plemmy/pull/34 for details.

Thanks to @Pdzly for the fix!

0.4.1

4 months ago

Implemented unit tests for:

  • LemmyHttp.login
  • LemmyHttp.get_community
  • LemmyHttp.create_post
  • LemmyHttp.delete_post
  • LemmyHttp.create_comment
  • LemmyHttp.delete_comment

0.4.0

5 months ago

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

0.3.11

6 months ago

Bug fixes per issue https://github.com/LemmyWorld/plemmy/issues/26.

Thanks to @Pdzly for finding this bug!

0.3.10

7 months ago
  • Fixes/updates LocalUser attributes
  • Remove extra comma

Thanks to @Pdzly and @deliciouslysmug for the contributions!

0.3.8

9 months ago

Changes outlined in PR https://github.com/tjkessler/plemmy/pull/23.

Thanks to @JLukeBlakey for the fix!

0.3.7

9 months ago

Outlined in PR https://github.com/tjkessler/plemmy/pull/21, this change adds the get_communities method to the LemmyHttp object. For example:

from plemmy import LemmyHttp

srv = LemmyHttp("<lemmy server>")
api_response = srv.get_communities(type_="All", sort="Hot", page=0, limit=50)

Thanks to @gwbischof for the contribution!

0.3.6

9 months ago

Per PR https://github.com/tjkessler/plemmy/pull/20 and issue https://github.com/tjkessler/plemmy/issues/19, Plemmy can be installed on Python 3.7+ (previously set to 3.11). This has been updated in pyproject.toml.

Thanks to @gwbischof for highlighting this, and to @ihyoudou for finding the minimum required Python version.

0.3.5

9 months ago

Per issue https://github.com/tjkessler/plemmy/issues/17, block_community did not work as of Plemmy version 0.3.4. I've tracked down the cause: it looks like the changes made in PR https://github.com/tjkessler/plemmy/pull/15 to the create_form utility function, i.e., turning boolean variables into strings, only really applies to get_person_mentions, as other functions such as block_community actually do require a boolean data type.

@mike-fmh: I had to revert some changes you made, but I think my solution of manually converting the boolean to a string fixes the get_person_mentions function. Not sure how many other similar functions are affected, feel free to make similar changes and make a PR if you run into any issues.

Very unfortunate that the API has some datatype mismatching, hopefully this will be fixed in the future.

Thanks to @AndrewFlan for pointing me in the right direction!