[go: up one dir, main page]

Skip to content

Python wrapper for the Lemmy API. Based the official Lemmy TS library.

Notifications You must be signed in to change notification settings

retiolus/Lemmy.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

Lemmy.py

The source code for this project is hosted on Codeberg: https://codeberg.org/retiolus/Lemmy.py

Python wrapper for the Lemmy API. Based on the official Lemmy TS library.

pip install Lemmy.py
from lemmy import Lemmy

# Login to your account
lemmy = Lemmy("https://lemmy.ml")
lemmy.log_in("username_or_email", "password")

# Get a community ID
community_id = lemmy.discover_community("community_name")

# Get all posts from a community by ID
community_posts = lemmy.post.list(community_id=community_id)

# Get the modlog of your server
modlog = lemmy.modlog.get()

# Post a new publication on a community
lemmy.post.create(community_id=community_id, name="First Post!", body="This is the first community post.")

Releases

No releases published

Packages

No packages published