pylemmy enables simple access to Lemmy's API with Python
Project description
pylemmy
Table of Contents
Installation
pip install pylemmy
Usage
Simple example of running a Python function on new posts, as they are created.
from pylemmy import Lemmy
def process_post(post):
...
lemmy = Lemmy(
lemmy_url="http://127.0.0.1:8536",
username="lemmy",
password="lemmylemmy",
user_agent="custom user agent (by u/USERNAME)",
)
community = lemmy.get_community("test")
for post in community.stream.get_posts():
process_post(post)
License
pylemmy
is distributed under the terms of the
MIT license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pylemmy-0.0.8.tar.gz
(19.3 kB
view details)
Built Distribution
pylemmy-0.0.8-py3-none-any.whl
(18.3 kB
view details)
File details
Details for the file pylemmy-0.0.8.tar.gz
.
File metadata
- Download URL: pylemmy-0.0.8.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45c2013d7f16fba05131b94712bf2d544bc9a26761bfea465cefe7c4c420bf1c |
|
MD5 | 3fd149f237d2c35da667daf8a1e5ba95 |
|
BLAKE2b-256 | 6b17547dd49a203ba87b7d17e2657c5001a9d7b55b498b5ab3203be8d3d36ebd |
File details
Details for the file pylemmy-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: pylemmy-0.0.8-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7743eb8ee72300cac4f623b8babc8df85ae984df5092d06dc99ea513152fd29f |
|
MD5 | 1dc9fd5b4d189eda60edc71182784782 |
|
BLAKE2b-256 | 7a208eb824760f943c3055113a8ced4118bce77cdac7e4d1d9f289bbf84bdb10 |