💭 Mastodon.py — Mastodon.py 1.8.1 documentation

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

Mastadon.py is a python api client for mastadon that makes it easy to cross post to mastadon.

from mastodon import Mastodon

Mastodon.create_app(
    'pytooterapp',
    api_base_url = 'https://mastodon.social',
    to_file = 'pytooter_clientcred.secret'
)

from mastodon import Mastodon

mastodon = Mastodon(client_id = 'pytooter_clientcred.secret',)
mastodon.log_in(
    '[email protected]',
    'incrediblygoodpassword',
    to_file = 'pytooter_usercred.secret'
)

mastodon.toot('Tooting from Python using #mastodonpy !')

Note

This post is a thought. It’s a short note that I make about someone else’s content online #thoughts

Connections

Related tags and posts connected to this entry.