Pythörhead
A python library for interacting with Lemmy
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.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pythorhead-0.34.3.tar.gz | 193.9 kB | Without provenance | Details for pythorhead-0.34.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pythorhead-0.34.3-py3-none-any.whl | Python 3 | none | any | Details for pythorhead-0.34.3-py3-none-any.whl |
Total release size: 251.7 kB
Release files / pythorhead-0.34.3.tar.gz
| Download URL | pythorhead-0.34.3.tar.gz |
|---|---|
| Size | 193.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cebbf03febfc37079a78df57295e19213b07680824fafc1e9e861d0e3dd04209
|
|
BLAKE2b-256 checksum How to use checksums |
aef0ae2d743e93b663eb6ad3edb072cfad970c050d30d38a868918c71e075465
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / pythorhead-0.34.3-py3-none-any.whl
| Download URL | pythorhead-0.34.3-py3-none-any.whl |
|---|---|
| Size | 57.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
428d273b08a61772c0abd3eef67342bf4c0532254702bc03bf65658de44308ff
|
|
BLAKE2b-256 checksum How to use checksums |
9404ca31590b7e0f8935747a0324929d83f13cf98b19e9a62d499fbf3b02df86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for pythorhead 0.34.3
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.