Need simple python app for understanding please

Hello.

I’m trying to use python (and mastodon.py I guess?) to do some basic stuff on Mastodon.

Does anyone have an example?

What I want to do: 1.) Search for a mastodon account by name, not id, I don’t have the id of course.
2.) Get in return that account’s id, name, followers, etc.

To solve this problem: Once I can do a basic “pull” of information, I can understand how all this works better.

For instance, why do we create an “application” Before logging in? I don’t understand that but please do anyone have a script to help with the aforementioned? Thank you.

I think it is good to have a look at the API documentation first

Those docs got updated recently and are pretty nice. I’d give them a try to get general understanding of how things work.

mastodon.py will just give you some wrappers around those API calls - but the introduction in the documentation is pretty good as well:

https://mastodonpy.readthedocs.io/en/stable/

Of course I already looked at the documentation.

I had questions. Some practical example of how-you would do it, would help.

1.) So it’s not mastodon.py, then what is a straight-programming example (if that’s what you do) that does “basic stuff?” Like say, creating an application programaticaly for myself. Or updating my profile.

2.) I still had questions. Like why on earth do you create an app Before logging in? There is nothing there that I saw that explained this. Can I make an app “in my account?” So it shows up under applications?