Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Ask Lemmy
  3. Lemmy Python API?

Lemmy Python API?

Scheduled Pinned Locked Moved Ask Lemmy
asklemmy
14 Posts 5 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • asudox@lemmy.asudox.devA [email protected]

    Plemmy seems to be no longer maintained. Use Pythörhead: https://github.com/db0/pythorhead

    V This user is from outside of this forum
    V This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #3

    Thanks, I'll check that out! Any idea if you can send and receive private messages with it (I'm not at my computer just now 🥺)?

    i_am_not_a_robot@feddit.ukI 1 Reply Last reply
    2
    • V [email protected]

      Thanks, I'll check that out! Any idea if you can send and receive private messages with it (I'm not at my computer just now 🥺)?

      i_am_not_a_robot@feddit.ukI This user is from outside of this forum
      i_am_not_a_robot@feddit.ukI This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #4

      Yes you can.

      V 1 Reply Last reply
      1
      • i_am_not_a_robot@feddit.ukI [email protected]

        Yes you can.

        V This user is from outside of this forum
        V This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #5

        Got it up and working, but only if the receiver is on my (lemmy) server, any idea if that's a voluntary limitation?

        i_am_not_a_robot@feddit.ukI nagaram@startrek.websiteN 2 Replies Last reply
        0
        • V [email protected]

          Got it up and working, but only if the receiver is on my (lemmy) server, any idea if that's a voluntary limitation?

          i_am_not_a_robot@feddit.ukI This user is from outside of this forum
          i_am_not_a_robot@feddit.ukI This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #6

          I'm not aware of anything, maybe there's something in the Lemmy config? Is federation generally working?

          V 1 Reply Last reply
          0
          • V [email protected]

            Got it up and working, but only if the receiver is on my (lemmy) server, any idea if that's a voluntary limitation?

            nagaram@startrek.websiteN This user is from outside of this forum
            nagaram@startrek.websiteN This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #7

            I could see that as a privacy measure.

            Everything on Lemmy is open anyways but maybe the maintainer didn't want to be the guy to make Lemmy data that accessible. So it's a limitation. You can only have Lemmy data if you are hosting the server and the community.

            1 Reply Last reply
            0
            • i_am_not_a_robot@feddit.ukI [email protected]

              I'm not aware of anything, maybe there's something in the Lemmy config? Is federation generally working?

              V This user is from outside of this forum
              V This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #8

              I can send messages manually (on my lemmy server to another), but the problem is I can't find "how to do it" programmatically. The examples are only for sending messages on the same server, I'm digging around in the git repo but haven't found anything that works yet.

              BTW is it db0 the creator?! I should maybe head over to his server and see if he's available.

              db0@lemmy.dbzer0.comD 1 Reply Last reply
              0
              • V [email protected]

                I can send messages manually (on my lemmy server to another), but the problem is I can't find "how to do it" programmatically. The examples are only for sending messages on the same server, I'm digging around in the git repo but haven't found anything that works yet.

                BTW is it db0 the creator?! I should maybe head over to his server and see if he's available.

                db0@lemmy.dbzer0.comD This user is from outside of this forum
                db0@lemmy.dbzer0.comD This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #9

                You can send messages to anyone with pythorhead, you just do it via your own lemmy server and need to provide the full username address

                V 1 Reply Last reply
                0
                • db0@lemmy.dbzer0.comD [email protected]

                  You can send messages to anyone with pythorhead, you just do it via your own lemmy server and need to provide the full username address

                  V This user is from outside of this forum
                  V This user is from outside of this forum
                  [email protected]
                  wrote on last edited by [email protected]
                  #10

                  Hello! Thanks for stepping by!

                  I only have either https://lemmy.world/u/Valmond (is that the 'full username address'?) or the (I guess lemmy.world local id) 370373, but lemmy.private_message chokes on both (lemmy here being the Lemmy object connected to my server).

                  I haven't found a API doc/guide, so I'm just modifying the examples.

                  Any info greatly appreciated!

                  db0@lemmy.dbzer0.comD 1 Reply Last reply
                  0
                  • V [email protected]

                    Hello! Thanks for stepping by!

                    I only have either https://lemmy.world/u/Valmond (is that the 'full username address'?) or the (I guess lemmy.world local id) 370373, but lemmy.private_message chokes on both (lemmy here being the Lemmy object connected to my server).

                    I haven't found a API doc/guide, so I'm just modifying the examples.

                    Any info greatly appreciated!

                    db0@lemmy.dbzer0.comD This user is from outside of this forum
                    db0@lemmy.dbzer0.comD This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #11

                    use get_user to get the user json, then PM using the id key of that

                    V 1 Reply Last reply
                    0
                    • db0@lemmy.dbzer0.comD [email protected]

                      use get_user to get the user json, then PM using the id key of that

                      V This user is from outside of this forum
                      V This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #12

                      I'm confused, here is what I'm doing:

                      • Make a Lemmy object: lemmy

                      • Connect it to my server lemmy.mindoki.com (with a user, pwd)

                      • lemmy.private_message('hello', *id")

                      Note: I have 1 user on my server, and one user on lemmy.world.

                      1. If I make a Lemmy object, connect it to my server (lemmy.mindoki.com), and asks for a user and use his id, it works.

                      2. If I make a Lemmy object, connect it to lemmy.world instead, and asks for a user there, and use his id, it doesn't work.

                      Which seems logic, the id is local to the instance isn't it?

                      For example, on my server it's 1263 for my user, on lemmy.world it's 370373, I can't just use that number without anything else to identify a user, right?

                      db0@lemmy.dbzer0.comD 1 Reply Last reply
                      0
                      • V [email protected]

                        I'm confused, here is what I'm doing:

                        • Make a Lemmy object: lemmy

                        • Connect it to my server lemmy.mindoki.com (with a user, pwd)

                        • lemmy.private_message('hello', *id")

                        Note: I have 1 user on my server, and one user on lemmy.world.

                        1. If I make a Lemmy object, connect it to my server (lemmy.mindoki.com), and asks for a user and use his id, it works.

                        2. If I make a Lemmy object, connect it to lemmy.world instead, and asks for a user there, and use his id, it doesn't work.

                        Which seems logic, the id is local to the instance isn't it?

                        For example, on my server it's 1263 for my user, on lemmy.world it's 370373, I can't just use that number without anything else to identify a user, right?

                        db0@lemmy.dbzer0.comD This user is from outside of this forum
                        db0@lemmy.dbzer0.comD This user is from outside of this forum
                        [email protected]
                        wrote on last edited by [email protected]
                        #13

                        So, you send a PM via your own server, so it's how your server refers to the remote user. So your own server's ID of that user matters, not the remote server's ID.

                        V 1 Reply Last reply
                        0
                        • db0@lemmy.dbzer0.comD [email protected]

                          So, you send a PM via your own server, so it's how your server refers to the remote user. So your own server's ID of that user matters, not the remote server's ID.

                          V This user is from outside of this forum
                          V This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #14

                          Aah yes of course 😅! Made it work, thanks a lot!!

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups