Plemmy

Latest version: v0.4.8

Safety actively analyzes 681844 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

0.3.2

Per PR https://github.com/tjkessler/plemmy/pull/14, fixes were made to a few objects in `plemmy.responses` so everything plays nice. Thanks to jheidecker for the contributions!

0.3.1

Per PR https://github.com/tjkessler/plemmy/pull/13, the `community` object now requires the `banner` attribute; this was added in a recent Lemmy update.

Thanks to fievel for the contribution!

0.3.0

As the title suggests, various functions/classes have been implemented to help users parse Lemmy API responses (`requests.Response` objects) into easily-usable Python objects. These functions/classes were designed based on how the [lemmy-js-client](https://join-lemmy.org/api/modules.html) handles responses and data types (person, comment, community, etc.).

For example:

python
from plemmy import LemmyHttp
from plemmy.responses import GetCommunityResponse

create object for `Lemmy.ml`, log in
srv = LemmyHttp("https://lemmy.ml")
srv.login("<username_or_email>", "<password>")

obtain community, parse response
api_response = srv.get_community(name="Lemmy") returns `requests.Response` object
response = GetCommunityResponse(api_response)

print community info
community = response.community_view.community
print(community.name)
print(community.actor_id)
print(community.id)


Full documentation is on its way, in the meantime browse our source code and [examples](https://github.com/tjkessler/plemmy/tree/main/examples)!

0.2.6

Symbolic follow-up to PR https://github.com/tjkessler/plemmy/pull/3, where all other GET operations now pass form data as the `params` argument. Brought to attention in issue https://github.com/tjkessler/plemmy/issues/10 by ajstamps, thanks for the contribution!

0.2.5

Added timeout functionality to Plemmy requests. On slow servers the requests can hang indefinitely requiring a stop and restart of the script. Set the timeout to 30 seconds.

Thanks to socphoenix for the contribution!

0.2.4

The `edit_community` function pointed to the wrong API endpoint. Fixed by benja810, thanks for the contribution!

Page 4 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.