A python library for interacting with Lemmy
See working examples in examples/
If you want to raise exceptions on failures instead of returning null, pass raise_exceptions=True
to the Lemmy()
constructor
from pythorhead import Lemmy
lemmy = Lemmy("https://lemmy.dbzer0.com")
lemmy.log_in("username", "password")
community_id = lemmy.discover_community("botart")
lemmy.post.create(community_id, "Hello Lemmy World")
from pythorhead import Lemmy
lemmy = Lemmy("https://lemmy.dbzer0.com")
lemmy.log_in("username", "password")
# getting the first post id
post_id = lemmy.post.list()[0]["post"]["id"]
# leave a comment
lemmy.comment.create(post_id, "Hello Lemmy World")