Skip to content

Releases: Fedihosting-Foundation/plemmy

0.3.0 - parsing `request.Response` JSON into Python objects

08 Jul 04:04
8dae75c
Compare
Choose a tag to compare

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 handles responses and data types (person, comment, community, etc.).

For example:

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!

0.2.6 (fixes to GET operations)

04 Jul 01:29
7a8ae0a
Compare
Choose a tag to compare

Symbolic follow-up to PR #3, where all other GET operations now pass form data as the params argument. Brought to attention in issue #10 by @ajstamps, thanks for the contribution!

0.2.5

30 Jun 20:46
Compare
Choose a tag to compare

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 (bug fix)

24 Jun 16:59
Compare
Choose a tag to compare

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

0.2.3 - new features, fixes

23 Jun 19:25
30a7a73
Compare
Choose a tag to compare
  • Added all emoji-related API calls
    • create, edit, delete custom emojis
  • Added new functions get_comment and get_federated_instances
  • Other fixes per LemmyHttp updates

0.2.2

21 Jun 17:45
Compare
Choose a tag to compare

A bug was fixed (#3) that caused a 400 error on get_community's GET operation. Are other GET operations affected by similar bugs? Time to test!

Thanks to @ihyoudou for the contribution.

0.2.1

21 Jun 05:09
c9a3548
Compare
Choose a tag to compare
  • All optional arguments now default to None
  • Better POST/PUT/GET form generation
  • Bug squashing

0.2.0

20 Jun 22:26
d160392
Compare
Choose a tag to compare
  • Added all remaining functions found in the LemmyHttp documentation
    • includes all POST, PUT, and GET operations
    • functions need testing!!
  • Next up:
    • unit testing
    • full documentation
    • example scripts

Initial release (0.1.0)

20 Jun 01:36
52c9f19
Compare
Choose a tag to compare

Just getting the project out there! Basic functionality has been implemented (log in, create comments/posts/communities, a few more), and more is to come. I'm writing methods alphabetically from LemmyHttp's documentation.