Skip to main content

Pythörhead

A python library for interacting with Lemmy

pythorhead logo

Examples

See working examples in examples/

Exceptions

If you want to raise exceptions on failures instead of returning null, pass raise_exceptions=True to the Lemmy() constructor.

The normal request timeout is 3 seconds. If you want to change this number, you can set it on the constructor uising request_timeout=

Sample Post Usage

from pythorhead import Lemmy

lemmy = Lemmy("https://lemmy.dbzer0.com",request_timeout=2)
lemmy.log_in("username", "password")
community_id = lemmy.discover_community("botart")
lemmy.post.create(community_id, "Hello Lemmy World")

Sample Comment Usage

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")

Metadata

Release files for pythorhead 0.34.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pythorhead 0.34.4
File Size Uploaded Provenance Actions
pythorhead-0.34.4.tar.gz 194.0 kB Without provenance Details for pythorhead-0.34.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pythorhead 0.34.4
File Interpreter ABI Platform Actions
pythorhead-0.34.4-py3-none-any.whl Python 3 none any Details for pythorhead-0.34.4-py3-none-any.whl

Total release size: 251.8 kB

Release files / pythorhead-0.34.4.tar.gz

Download URL pythorhead-0.34.4.tar.gz
Size 194.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d1c6e2eb0338f9d55f511d3c64a36b0c710bb4f15d586e40778e32619d53a9b1
BLAKE2b-256 checksum
How to use checksums
83a6545c9c41e176f5b8f6cf8eb8f22a18d5da489ea0cd0fa6a0ce16669ce9e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pythorhead-0.34.4-py3-none-any.whl

Download URL pythorhead-0.34.4-py3-none-any.whl
Size 57.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
295515945c6e17d1b54f07f41e93759fa1b283ca77311cd33e19f404043dc7ba
BLAKE2b-256 checksum
How to use checksums
9a69e2969ca02fdda9e736c6116bea99c9fae284b8f46935853196427268fd98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for pythorhead 0.34.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.34.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page