Just wrote and released a new python library for interacting with the Lemmy API

https://pypi.org/project/pythorhead/

Early release but excited to share. Currently supports logging in, searching for a community and posting into it.

I am using in my mastodon bot, to crosspost to my reddit community

45 points · 15 comments · view on lemmy.world

15 Comments

lowleveldata@programming.dev · 5 pts · 3y (1 reply)

But how much are you going to charge us? /s

db0@lemmy.dbzer0.com · 6 pts · 3y

It's subscription based. You gotta subscribe to my communities or I'm sending you RMS' discarded footnails! ___

eatham@aussie.zone · 5 pts · 3y

Looks cool, but you should make documentation on all it's functions or ited be pretty hard to use

reddthat@reddthat.com · 4 pts · 3y (2 replies)

Requires <3.11

/me am dissapoint

db0@lemmy.dbzer0.com · 2 pts · 3y (1 reply)

Eh probably works. I just haven't tested it

reddthat@reddthat.com · 1 pts · 3y

Confirming works with 3.11 :)

jnovinger@programming.dev · 3 pts · 3y (1 reply)

Oooh, was just thinking about needing something like this for future tools. Will check it out!

db0@lemmy.dbzer0.com · 4 pts · 3y

feel free to help improve it

fpvian@programming.dev · 1 pts · 3y (2 replies)

Do you know what the rate limit is? I’m here because Reddit can kiss my ass but I’m not seeing how Lemmy is better for apis, unless you count third-party client support?

db0@lemmy.dbzer0.com · 3 pts · 3y (1 reply)

the rate limit is customizable per instance, but these are the defaults

You can of course extend this by using multiple instances instead of one.

fpvian@programming.dev · 2 pts · 3y

That is generous, thanks!

Sigmatics@lemmy.ca · 1 pts · 3y

This is kinda the most advanced Lemmy API, but the name and logo are a turn-off honestly

erre@feddit.win · 1 pts · 3y

Thanks for this! I was looking into making a Lemmy bot and am much more comfortable with python. Gonna star it and keep an eye on updates.

Jakob@programming.dev · 1 pts · 3y

Nice work!